From 08e3b3247ccb61c953d6bd48a36b52546dc899df Mon Sep 17 00:00:00 2001 From: Marcel Arndt Date: Thu, 5 Jun 2025 15:24:23 +0200 Subject: [PATCH] (dc): data-connector enhancements --- service/data-hub/data-connector/Dockerfile | 18 +- .../data-hub/data-connector/package-lock.json | 1021 +++++++++-------- service/data-hub/data-connector/package.json | 9 +- .../prisma/seed/tariffs/btw-aok.ts | 151 ++- .../prisma/seed/tariffs/btw-dak-vdek.ts | 20 +- .../prisma/seed/tariffs/btw-privat.ts | 45 +- .../prisma/seed/tariffs/ktw-aok.ts | 207 +++- .../prisma/seed/tariffs/ktw-dak.ts | 308 ++++- .../prisma/seed/tariffs/ktw-privat.ts | 72 +- .../prisma/seed/tariffs/ktw-vdek.ts | 151 ++- .../prisma/seed/tariffs/tsw-aok.ts | 144 ++- .../prisma/seed/tariffs/tsw-dak-vdek.ts | 55 +- .../prisma/seed/tariffs/tsw-privat.ts | 43 +- .../data-hub/data-connector/src/app.module.ts | 11 +- .../data-connector/src/app.service.ts | 25 +- .../src/core/database/schema.gql | 48 + service/data-hub/data-connector/src/main.ts | 4 + .../app-accounting/accounting-arg.types.ts | 4 + .../accounting-validation.repository.ts | 33 +- .../accounting-validation.resolver.ts | 7 +- .../accounting-validation.service.ts | 18 +- .../app-accounting/accounting.object-type.ts | 30 +- .../app-accounting/accounting.service.ts | 50 + .../app-accounting/app-accounting.module.ts | 5 +- .../app-control-center.module.ts | 3 +- .../control-center.resolver.ts | 8 +- .../src/modules/app-home/app-home.module.ts | 10 + .../src/modules/app-home/home.object-type.ts | 33 + .../src/modules/app-home/home.resolver.ts | 13 + .../src/modules/app-home/home.service.ts | 444 +++++++ .../modules/app-manager/app-manager.module.ts | 15 +- .../app-manager/time-per-tour-kpi.service.ts | 2 +- .../time-per-tour-metrics.service.ts | 2 +- .../ticket-lifecycle.service.ts | 39 +- .../ticket-validation.functions.ts | 18 +- .../employees-logged-in.detector.ts | 4 +- ...yee-not-in-distribution-system.detector.ts | 9 +- .../car-entity/car-entity.repository.ts | 19 +- .../car-entity/car-entity.service.ts | 0 .../car-entity/car.entity.ts | 2 +- .../feat-business-objects.module.ts | 11 + .../feat-calculation/calculation.service.ts | 235 ++-- .../cost-type-calculations.ts | 106 ++ .../feat-calculation.module.ts | 2 +- .../feat-loaders/loaders/tour.loader.ts | 2 + .../data-access-transformers.module.ts | 4 +- .../transformers/patient.transformer.ts | 6 +- .../transformers/planned-time.transformer.ts | 4 +- .../transformers/tour.transformer.ts | 20 +- .../transformers/work-time.transformer.ts | 4 +- .../src/modules/feat-kpis/feat-kpis.module.ts | 13 + .../src/modules/feat-kpis/kpi.resolver.ts | 24 + .../src/modules/feat-kpis/kpi.service.ts | 384 +++++++ .../src/modules/feat-kpis/object-types.ts | 19 + .../feat-tickets/ticket-lifecycle.service.ts | 40 +- .../ticket-validation.functions.ts | 18 +- service/data-hub/data-connector/src/tracer.ts | 40 + 57 files changed, 3117 insertions(+), 915 deletions(-) create mode 100644 service/data-hub/data-connector/src/modules/app-accounting/accounting.service.ts create mode 100644 service/data-hub/data-connector/src/modules/app-home/app-home.module.ts create mode 100644 service/data-hub/data-connector/src/modules/app-home/home.object-type.ts create mode 100644 service/data-hub/data-connector/src/modules/app-home/home.resolver.ts create mode 100644 service/data-hub/data-connector/src/modules/app-home/home.service.ts rename service/data-hub/data-connector/src/modules/{app-manager => feat-business-objects}/car-entity/car-entity.repository.ts (90%) rename service/data-hub/data-connector/src/modules/{app-manager => feat-business-objects}/car-entity/car-entity.service.ts (100%) rename service/data-hub/data-connector/src/modules/{app-manager => feat-business-objects}/car-entity/car.entity.ts (98%) create mode 100644 service/data-hub/data-connector/src/modules/feat-business-objects/feat-business-objects.module.ts create mode 100644 service/data-hub/data-connector/src/modules/feat-calculation/cost-type-calculations.ts create mode 100644 service/data-hub/data-connector/src/modules/feat-kpis/feat-kpis.module.ts create mode 100644 service/data-hub/data-connector/src/modules/feat-kpis/kpi.resolver.ts create mode 100644 service/data-hub/data-connector/src/modules/feat-kpis/kpi.service.ts create mode 100644 service/data-hub/data-connector/src/modules/feat-kpis/object-types.ts create mode 100644 service/data-hub/data-connector/src/tracer.ts diff --git a/service/data-hub/data-connector/Dockerfile b/service/data-hub/data-connector/Dockerfile index 2a91b2f..8a5d570 100644 --- a/service/data-hub/data-connector/Dockerfile +++ b/service/data-hub/data-connector/Dockerfile @@ -1,26 +1,28 @@ FROM node:20.15.1-alpine AS builder WORKDIR /app/builder +COPY package.json . +COPY package-lock.json . +RUN npm install COPY . . -RUN npm install RUN npm run build FROM node:20.15.1-alpine -ENV OTEL_TRACES_EXPORTER="otlp" -ENV OTEL_METRICS_EXPORTER="otlp" -ENV OTEL_LOGS_EXPORTER="otlp" -ENV NODE_OPTIONS="--require @opentelemetry/auto-instrumentations-node/register" +# ENV OTEL_TRACES_EXPORTER="otlp" +# ENV OTEL_METRICS_EXPORTER="otlp" +# ENV OTEL_LOGS_EXPORTER="otlp" +# ENV NODE_OPTIONS="--require @opentelemetry/auto-instrumentations-node/register" # To setup your own Service Instance ID -ENV OTEL_RESOURCE_ATTRIBUTES="service.instance.id=avicenna.data-connector" +# ENV OTEL_RESOURCE_ATTRIBUTES="service.instance.id=avicenna.data-connector" # ENV OTEL_NODE_RESOURCE_DETECTORS="env,host,os" # To have a Service Instance ID generated using a random UUID # Requires auto-instrumentations-node version 0.46.0+ -ENV OTEL_NODE_RESOURCE_DETECTORS="env,host,os,serviceinstance,container" +# ENV OTEL_NODE_RESOURCE_DETECTORS="env,host,os,serviceinstance,container" WORKDIR /app @@ -31,4 +33,4 @@ COPY --from=builder /app/builder/docker-entrypoint.sh . ENTRYPOINT [ "./docker-entrypoint.sh" ] -CMD [ "node", "./src/main.js" ] \ No newline at end of file +CMD ["node", "./src/main.js" ] \ No newline at end of file diff --git a/service/data-hub/data-connector/package-lock.json b/service/data-hub/data-connector/package-lock.json index e66a483..7a392d4 100644 --- a/service/data-hub/data-connector/package-lock.json +++ b/service/data-hub/data-connector/package-lock.json @@ -21,12 +21,9 @@ "@nestjs/platform-express": "^11.0.15", "@nestjs/schedule": "^5.0.1", "@opentelemetry/api": "^1.9.0", - "@opentelemetry/auto-instrumentations-node": "^0.57.1", - "@opentelemetry/exporter-metrics-otlp-proto": "^0.200.0", - "@opentelemetry/exporter-trace-otlp-proto": "^0.200.0", - "@opentelemetry/resources": "^2.0.0", - "@opentelemetry/sdk-node": "^0.200.0", - "@opentelemetry/semantic-conventions": "^1.31.0", + "@opentelemetry/auto-instrumentations-node": "^0.60.0", + "@opentelemetry/exporter-trace-otlp-http": "^0.202.0", + "@opentelemetry/sdk-node": "^0.202.0", "@prisma/client": "^6.6.0", "date-fns": "^4.1.0", "date-fns-tz": "^3.2.0", @@ -1666,9 +1663,9 @@ } }, "node_modules/@grpc/grpc-js": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.13.2.tgz", - "integrity": "sha512-nnR5nmL6lxF8YBqb6gWvEgLdLh/Fn+kvAdX5hUOnt48sNSb0riz/93ASd2E5gvanPA41X6Yp25bIfGRp1SMb2g==", + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.13.4.tgz", + "integrity": "sha512-GsFaMXCkMqkKIvwCQjCrwH+GHbPKBjhwo/8ZuUkWHqbI73Kky9I+pQltrlT0+MWpedCoosda53lgjYfyEPgxBg==", "dependencies": { "@grpc/proto-loader": "^0.7.13", "@js-sdsl/ordered-map": "^4.4.2" @@ -1678,9 +1675,9 @@ } }, "node_modules/@grpc/proto-loader": { - "version": "0.7.13", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.13.tgz", - "integrity": "sha512-AiXO/bfe9bmxBjxxtYxFAXGZvMaN5s8kO+jBHAJCON8rJoB5YS/D6X7ZNc6XQkuHNmyl4CYaMI1fJ/Gn27RGGw==", + "version": "0.7.15", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.15.tgz", + "integrity": "sha512-tMXdRCfYVixjuFK+Hk0Q1s38gV9zDiDJfWL3h1rv4Qc39oILCu1TRTDt7+fGUI8K4G1Fj125Hx/ru3azECWTyQ==", "dependencies": { "lodash.camelcase": "^4.3.0", "long": "^5.0.0", @@ -1695,9 +1692,9 @@ } }, "node_modules/@grpc/proto-loader/node_modules/long": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/long/-/long-5.3.1.tgz", - "integrity": "sha512-ka87Jz3gcx/I7Hal94xaN2tZEOPoUOEVftkQqZx2EeQRN7LGdfLlI3FvZ+7WDplm+vK2Urx9ULrvSowtdCieng==" + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", + "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==" }, "node_modules/@humanfs/core": { "version": "0.19.1", @@ -3480,9 +3477,9 @@ } }, "node_modules/@opentelemetry/api-logs": { - "version": "0.200.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.200.0.tgz", - "integrity": "sha512-IKJBQxh91qJ+3ssRly5hYEJ8NDHu9oY/B1PXVSCWf7zytmYO9RNLB0Ox9XQ/fJ8m6gY6Q6NtBWlmXfaXt5Uc4Q==", + "version": "0.202.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.202.0.tgz", + "integrity": "sha512-fTBjMqKCfotFWfLzaKyhjLvyEyq5vDKTTFfBmx21btv3gvy8Lq6N5Dh2OzqeuN4DjtpSvNT1uNVfg08eD2Rfxw==", "dependencies": { "@opentelemetry/api": "^1.3.0" }, @@ -3491,57 +3488,59 @@ } }, "node_modules/@opentelemetry/auto-instrumentations-node": { - "version": "0.57.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/auto-instrumentations-node/-/auto-instrumentations-node-0.57.1.tgz", - "integrity": "sha512-yy+K3vYybqJ6Z4XZCXYYxEC1DtEpPrnJdwxkhI0sTtVlrVnzx49iRLqpMmdvQ4b09+PrvXSN9t0jODMCGNrs8w==", + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/auto-instrumentations-node/-/auto-instrumentations-node-0.60.0.tgz", + "integrity": "sha512-5QYMqeu1tqSiJ/ilEd3B6XACjFqzbflrHuYw5QpWBbxLbOUwkPi/iqWNLBcTPErMMhkK/wGocpeFTUCFo5Ga8Q==", "dependencies": { - "@opentelemetry/instrumentation": "^0.200.0", - "@opentelemetry/instrumentation-amqplib": "^0.47.0", - "@opentelemetry/instrumentation-aws-lambda": "^0.51.0", - "@opentelemetry/instrumentation-aws-sdk": "^0.51.0", - "@opentelemetry/instrumentation-bunyan": "^0.46.0", - "@opentelemetry/instrumentation-cassandra-driver": "^0.46.0", - "@opentelemetry/instrumentation-connect": "^0.44.0", - "@opentelemetry/instrumentation-cucumber": "^0.15.0", - "@opentelemetry/instrumentation-dataloader": "^0.17.0", - "@opentelemetry/instrumentation-dns": "^0.44.0", - "@opentelemetry/instrumentation-express": "^0.48.0", - "@opentelemetry/instrumentation-fastify": "^0.45.0", - "@opentelemetry/instrumentation-fs": "^0.20.0", - "@opentelemetry/instrumentation-generic-pool": "^0.44.0", - "@opentelemetry/instrumentation-graphql": "^0.48.0", - "@opentelemetry/instrumentation-grpc": "^0.200.0", - "@opentelemetry/instrumentation-hapi": "^0.46.0", - "@opentelemetry/instrumentation-http": "^0.200.0", - "@opentelemetry/instrumentation-ioredis": "^0.48.0", - "@opentelemetry/instrumentation-kafkajs": "^0.9.0", - "@opentelemetry/instrumentation-knex": "^0.45.0", - "@opentelemetry/instrumentation-koa": "^0.48.0", - "@opentelemetry/instrumentation-lru-memoizer": "^0.45.0", - "@opentelemetry/instrumentation-memcached": "^0.44.0", - "@opentelemetry/instrumentation-mongodb": "^0.53.0", - "@opentelemetry/instrumentation-mongoose": "^0.47.0", - "@opentelemetry/instrumentation-mysql": "^0.46.0", - "@opentelemetry/instrumentation-mysql2": "^0.46.0", - "@opentelemetry/instrumentation-nestjs-core": "^0.46.0", - "@opentelemetry/instrumentation-net": "^0.44.0", - "@opentelemetry/instrumentation-pg": "^0.52.0", - "@opentelemetry/instrumentation-pino": "^0.47.0", - "@opentelemetry/instrumentation-redis": "^0.47.0", - "@opentelemetry/instrumentation-redis-4": "^0.47.0", - "@opentelemetry/instrumentation-restify": "^0.46.0", - "@opentelemetry/instrumentation-router": "^0.45.0", - "@opentelemetry/instrumentation-socket.io": "^0.47.0", - "@opentelemetry/instrumentation-tedious": "^0.19.0", - "@opentelemetry/instrumentation-undici": "^0.11.0", - "@opentelemetry/instrumentation-winston": "^0.45.0", - "@opentelemetry/resource-detector-alibaba-cloud": "^0.31.0", - "@opentelemetry/resource-detector-aws": "^2.0.0", - "@opentelemetry/resource-detector-azure": "^0.7.0", - "@opentelemetry/resource-detector-container": "^0.7.0", - "@opentelemetry/resource-detector-gcp": "^0.34.0", + "@opentelemetry/instrumentation": "^0.202.0", + "@opentelemetry/instrumentation-amqplib": "^0.49.0", + "@opentelemetry/instrumentation-aws-lambda": "^0.53.0", + "@opentelemetry/instrumentation-aws-sdk": "^0.54.0", + "@opentelemetry/instrumentation-bunyan": "^0.48.0", + "@opentelemetry/instrumentation-cassandra-driver": "^0.48.0", + "@opentelemetry/instrumentation-connect": "^0.46.0", + "@opentelemetry/instrumentation-cucumber": "^0.17.0", + "@opentelemetry/instrumentation-dataloader": "^0.19.0", + "@opentelemetry/instrumentation-dns": "^0.46.0", + "@opentelemetry/instrumentation-express": "^0.51.0", + "@opentelemetry/instrumentation-fastify": "^0.47.0", + "@opentelemetry/instrumentation-fs": "^0.22.0", + "@opentelemetry/instrumentation-generic-pool": "^0.46.0", + "@opentelemetry/instrumentation-graphql": "^0.50.0", + "@opentelemetry/instrumentation-grpc": "^0.202.0", + "@opentelemetry/instrumentation-hapi": "^0.48.0", + "@opentelemetry/instrumentation-http": "^0.202.0", + "@opentelemetry/instrumentation-ioredis": "^0.50.0", + "@opentelemetry/instrumentation-kafkajs": "^0.11.0", + "@opentelemetry/instrumentation-knex": "^0.47.0", + "@opentelemetry/instrumentation-koa": "^0.50.0", + "@opentelemetry/instrumentation-lru-memoizer": "^0.47.0", + "@opentelemetry/instrumentation-memcached": "^0.46.0", + "@opentelemetry/instrumentation-mongodb": "^0.55.0", + "@opentelemetry/instrumentation-mongoose": "^0.49.0", + "@opentelemetry/instrumentation-mysql": "^0.48.0", + "@opentelemetry/instrumentation-mysql2": "^0.48.0", + "@opentelemetry/instrumentation-nestjs-core": "^0.48.0", + "@opentelemetry/instrumentation-net": "^0.46.0", + "@opentelemetry/instrumentation-oracledb": "^0.28.0", + "@opentelemetry/instrumentation-pg": "^0.54.0", + "@opentelemetry/instrumentation-pino": "^0.49.0", + "@opentelemetry/instrumentation-redis": "^0.49.0", + "@opentelemetry/instrumentation-redis-4": "^0.49.0", + "@opentelemetry/instrumentation-restify": "^0.48.0", + "@opentelemetry/instrumentation-router": "^0.47.0", + "@opentelemetry/instrumentation-runtime-node": "^0.16.0", + "@opentelemetry/instrumentation-socket.io": "^0.49.0", + "@opentelemetry/instrumentation-tedious": "^0.21.0", + "@opentelemetry/instrumentation-undici": "^0.13.0", + "@opentelemetry/instrumentation-winston": "^0.47.0", + "@opentelemetry/resource-detector-alibaba-cloud": "^0.31.2", + "@opentelemetry/resource-detector-aws": "^2.2.0", + "@opentelemetry/resource-detector-azure": "^0.9.0", + "@opentelemetry/resource-detector-container": "^0.7.2", + "@opentelemetry/resource-detector-gcp": "^0.36.0", "@opentelemetry/resources": "^2.0.0", - "@opentelemetry/sdk-node": "^0.200.0" + "@opentelemetry/sdk-node": "^0.202.0" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -3552,9 +3551,9 @@ } }, "node_modules/@opentelemetry/context-async-hooks": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-2.0.0.tgz", - "integrity": "sha512-IEkJGzK1A9v3/EHjXh3s2IiFc6L4jfK+lNgKVgUjeUJQRRhnVFMIO3TAvKwonm9O1HebCuoOt98v8bZW7oVQHA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-2.0.1.tgz", + "integrity": "sha512-XuY23lSI3d4PEqKA+7SLtAgwqIfc6E/E9eAQWLN1vlpC53ybO3o6jW4BsXo1xvz9lYyyWItfQDDLzezER01mCw==", "engines": { "node": "^18.19.0 || >=20.6.0" }, @@ -3563,9 +3562,9 @@ } }, "node_modules/@opentelemetry/core": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.0.tgz", - "integrity": "sha512-SLX36allrcnVaPYG3R78F/UZZsBsvbc7lMCLx37LyH5MJ1KAAZ2E3mW9OAD3zGz0G8q/BtoS5VUrjzDydhD6LQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz", + "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==", "dependencies": { "@opentelemetry/semantic-conventions": "^1.29.0" }, @@ -3577,16 +3576,16 @@ } }, "node_modules/@opentelemetry/exporter-logs-otlp-grpc": { - "version": "0.200.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-grpc/-/exporter-logs-otlp-grpc-0.200.0.tgz", - "integrity": "sha512-+3MDfa5YQPGM3WXxW9kqGD85Q7s9wlEMVNhXXG7tYFLnIeaseUt9YtCeFhEDFzfEktacdFpOtXmJuNW8cHbU5A==", + "version": "0.202.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-grpc/-/exporter-logs-otlp-grpc-0.202.0.tgz", + "integrity": "sha512-Y84L8Yja/A2qjGEzC/To0yrMUXHrtwJzHtZ2za1/ulZplRe5QFsLNyHixIS42ZYUKuNyWMDgOFhnN2Pz5uThtg==", "dependencies": { "@grpc/grpc-js": "^1.7.1", - "@opentelemetry/core": "2.0.0", - "@opentelemetry/otlp-exporter-base": "0.200.0", - "@opentelemetry/otlp-grpc-exporter-base": "0.200.0", - "@opentelemetry/otlp-transformer": "0.200.0", - "@opentelemetry/sdk-logs": "0.200.0" + "@opentelemetry/core": "2.0.1", + "@opentelemetry/otlp-exporter-base": "0.202.0", + "@opentelemetry/otlp-grpc-exporter-base": "0.202.0", + "@opentelemetry/otlp-transformer": "0.202.0", + "@opentelemetry/sdk-logs": "0.202.0" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -3596,15 +3595,15 @@ } }, "node_modules/@opentelemetry/exporter-logs-otlp-http": { - "version": "0.200.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-http/-/exporter-logs-otlp-http-0.200.0.tgz", - "integrity": "sha512-KfWw49htbGGp9s8N4KI8EQ9XuqKJ0VG+yVYVYFiCYSjEV32qpQ5qZ9UZBzOZ6xRb+E16SXOSCT3RkqBVSABZ+g==", + "version": "0.202.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-http/-/exporter-logs-otlp-http-0.202.0.tgz", + "integrity": "sha512-mJWLkmoG+3r+SsYQC+sbWoy1rjowJhMhFvFULeIPTxSI+EZzKPya0+NZ3+vhhgx2UTybGQlye3FBtCH3o6Rejg==", "dependencies": { - "@opentelemetry/api-logs": "0.200.0", - "@opentelemetry/core": "2.0.0", - "@opentelemetry/otlp-exporter-base": "0.200.0", - "@opentelemetry/otlp-transformer": "0.200.0", - "@opentelemetry/sdk-logs": "0.200.0" + "@opentelemetry/api-logs": "0.202.0", + "@opentelemetry/core": "2.0.1", + "@opentelemetry/otlp-exporter-base": "0.202.0", + "@opentelemetry/otlp-transformer": "0.202.0", + "@opentelemetry/sdk-logs": "0.202.0" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -3614,17 +3613,17 @@ } }, "node_modules/@opentelemetry/exporter-logs-otlp-proto": { - "version": "0.200.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-proto/-/exporter-logs-otlp-proto-0.200.0.tgz", - "integrity": "sha512-GmahpUU/55hxfH4TP77ChOfftADsCq/nuri73I/AVLe2s4NIglvTsaACkFVZAVmnXXyPS00Fk3x27WS3yO07zA==", + "version": "0.202.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-proto/-/exporter-logs-otlp-proto-0.202.0.tgz", + "integrity": "sha512-qYwbmNWPkP7AbzX8o4DRu5bb/a0TWYNcpZc1NEAOhuV7pgBpAUPEClxRWPN94ulIia+PfQjzFGMaRwmLGmNP6g==", "dependencies": { - "@opentelemetry/api-logs": "0.200.0", - "@opentelemetry/core": "2.0.0", - "@opentelemetry/otlp-exporter-base": "0.200.0", - "@opentelemetry/otlp-transformer": "0.200.0", - "@opentelemetry/resources": "2.0.0", - "@opentelemetry/sdk-logs": "0.200.0", - "@opentelemetry/sdk-trace-base": "2.0.0" + "@opentelemetry/api-logs": "0.202.0", + "@opentelemetry/core": "2.0.1", + "@opentelemetry/otlp-exporter-base": "0.202.0", + "@opentelemetry/otlp-transformer": "0.202.0", + "@opentelemetry/resources": "2.0.1", + "@opentelemetry/sdk-logs": "0.202.0", + "@opentelemetry/sdk-trace-base": "2.0.1" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -3634,18 +3633,18 @@ } }, "node_modules/@opentelemetry/exporter-metrics-otlp-grpc": { - "version": "0.200.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-grpc/-/exporter-metrics-otlp-grpc-0.200.0.tgz", - "integrity": "sha512-uHawPRvKIrhqH09GloTuYeq2BjyieYHIpiklOvxm9zhrCL2eRsnI/6g9v2BZTVtGp8tEgIa7rCQ6Ltxw6NBgew==", + "version": "0.202.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-grpc/-/exporter-metrics-otlp-grpc-0.202.0.tgz", + "integrity": "sha512-/dq/rf4KCkTYoP+NyPXTE+5wjvfhAHSqK62vRsJ/IalG61VPQvwaL18yWcavbI+44ImQwtMeZxfIJSox7oQL0w==", "dependencies": { "@grpc/grpc-js": "^1.7.1", - "@opentelemetry/core": "2.0.0", - "@opentelemetry/exporter-metrics-otlp-http": "0.200.0", - "@opentelemetry/otlp-exporter-base": "0.200.0", - "@opentelemetry/otlp-grpc-exporter-base": "0.200.0", - "@opentelemetry/otlp-transformer": "0.200.0", - "@opentelemetry/resources": "2.0.0", - "@opentelemetry/sdk-metrics": "2.0.0" + "@opentelemetry/core": "2.0.1", + "@opentelemetry/exporter-metrics-otlp-http": "0.202.0", + "@opentelemetry/otlp-exporter-base": "0.202.0", + "@opentelemetry/otlp-grpc-exporter-base": "0.202.0", + "@opentelemetry/otlp-transformer": "0.202.0", + "@opentelemetry/resources": "2.0.1", + "@opentelemetry/sdk-metrics": "2.0.1" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -3655,15 +3654,15 @@ } }, "node_modules/@opentelemetry/exporter-metrics-otlp-http": { - "version": "0.200.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-http/-/exporter-metrics-otlp-http-0.200.0.tgz", - "integrity": "sha512-5BiR6i8yHc9+qW7F6LqkuUnIzVNA7lt0qRxIKcKT+gq3eGUPHZ3DY29sfxI3tkvnwMgtnHDMNze5DdxW39HsAw==", + "version": "0.202.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-http/-/exporter-metrics-otlp-http-0.202.0.tgz", + "integrity": "sha512-ooYcrf/m9ZuVGpQnER7WRH+JZbDPD389HG7VS/EnvIEF5WpNYEqf+NdmtaAcs51d81QrytTYAubc5bVWi//28w==", "dependencies": { - "@opentelemetry/core": "2.0.0", - "@opentelemetry/otlp-exporter-base": "0.200.0", - "@opentelemetry/otlp-transformer": "0.200.0", - "@opentelemetry/resources": "2.0.0", - "@opentelemetry/sdk-metrics": "2.0.0" + "@opentelemetry/core": "2.0.1", + "@opentelemetry/otlp-exporter-base": "0.202.0", + "@opentelemetry/otlp-transformer": "0.202.0", + "@opentelemetry/resources": "2.0.1", + "@opentelemetry/sdk-metrics": "2.0.1" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -3673,16 +3672,16 @@ } }, "node_modules/@opentelemetry/exporter-metrics-otlp-proto": { - "version": "0.200.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-proto/-/exporter-metrics-otlp-proto-0.200.0.tgz", - "integrity": "sha512-E+uPj0yyvz81U9pvLZp3oHtFrEzNSqKGVkIViTQY1rH3TOobeJPSpLnTVXACnCwkPR5XeTvPnK3pZ2Kni8AFMg==", + "version": "0.202.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-proto/-/exporter-metrics-otlp-proto-0.202.0.tgz", + "integrity": "sha512-X0RpPpPjyCAmIq9tySZm0Hk3Ltw8KWsqeNq5I7gS9AR9RzbVHb/l+eiMI1CqSRvW9R47HXcUu/epmEzY8ebFAg==", "dependencies": { - "@opentelemetry/core": "2.0.0", - "@opentelemetry/exporter-metrics-otlp-http": "0.200.0", - "@opentelemetry/otlp-exporter-base": "0.200.0", - "@opentelemetry/otlp-transformer": "0.200.0", - "@opentelemetry/resources": "2.0.0", - "@opentelemetry/sdk-metrics": "2.0.0" + "@opentelemetry/core": "2.0.1", + "@opentelemetry/exporter-metrics-otlp-http": "0.202.0", + "@opentelemetry/otlp-exporter-base": "0.202.0", + "@opentelemetry/otlp-transformer": "0.202.0", + "@opentelemetry/resources": "2.0.1", + "@opentelemetry/sdk-metrics": "2.0.1" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -3692,13 +3691,13 @@ } }, "node_modules/@opentelemetry/exporter-prometheus": { - "version": "0.200.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-prometheus/-/exporter-prometheus-0.200.0.tgz", - "integrity": "sha512-ZYdlU9r0USuuYppiDyU2VFRA0kFl855ylnb3N/2aOlXrbA4PMCznen7gmPbetGQu7pz8Jbaf4fwvrDnVdQQXSw==", + "version": "0.202.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-prometheus/-/exporter-prometheus-0.202.0.tgz", + "integrity": "sha512-6RvQqZHAPFiwL1OKRJe4ta6SgJx/g8or41B+OovVVEie3HeCDhDGL9S1VJNkBozUz6wTY8a47fQwdMrCOUdMhQ==", "dependencies": { - "@opentelemetry/core": "2.0.0", - "@opentelemetry/resources": "2.0.0", - "@opentelemetry/sdk-metrics": "2.0.0" + "@opentelemetry/core": "2.0.1", + "@opentelemetry/resources": "2.0.1", + "@opentelemetry/sdk-metrics": "2.0.1" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -3708,17 +3707,17 @@ } }, "node_modules/@opentelemetry/exporter-trace-otlp-grpc": { - "version": "0.200.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-grpc/-/exporter-trace-otlp-grpc-0.200.0.tgz", - "integrity": "sha512-hmeZrUkFl1YMsgukSuHCFPYeF9df0hHoKeHUthRKFCxiURs+GwF1VuabuHmBMZnjTbsuvNjOB+JSs37Csem/5Q==", + "version": "0.202.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-grpc/-/exporter-trace-otlp-grpc-0.202.0.tgz", + "integrity": "sha512-d5wLdbNA3ahpSeD0I34vbDFMTh4vPsXemH0bKDXLeCVULCAjOJXuZmEiuRammiDgVvvX7CAb/IGLDz8d2QHvoA==", "dependencies": { "@grpc/grpc-js": "^1.7.1", - "@opentelemetry/core": "2.0.0", - "@opentelemetry/otlp-exporter-base": "0.200.0", - "@opentelemetry/otlp-grpc-exporter-base": "0.200.0", - "@opentelemetry/otlp-transformer": "0.200.0", - "@opentelemetry/resources": "2.0.0", - "@opentelemetry/sdk-trace-base": "2.0.0" + "@opentelemetry/core": "2.0.1", + "@opentelemetry/otlp-exporter-base": "0.202.0", + "@opentelemetry/otlp-grpc-exporter-base": "0.202.0", + "@opentelemetry/otlp-transformer": "0.202.0", + "@opentelemetry/resources": "2.0.1", + "@opentelemetry/sdk-trace-base": "2.0.1" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -3728,15 +3727,15 @@ } }, "node_modules/@opentelemetry/exporter-trace-otlp-http": { - "version": "0.200.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.200.0.tgz", - "integrity": "sha512-Goi//m/7ZHeUedxTGVmEzH19NgqJY+Bzr6zXo1Rni1+hwqaksEyJ44gdlEMREu6dzX1DlAaH/qSykSVzdrdafA==", + "version": "0.202.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.202.0.tgz", + "integrity": "sha512-/hKE8DaFCJuaQqE1IxpgkcjOolUIwgi3TgHElPVKGdGRBSmJMTmN/cr6vWa55pCJIXPyhKvcMrbrya7DZ3VmzA==", "dependencies": { - "@opentelemetry/core": "2.0.0", - "@opentelemetry/otlp-exporter-base": "0.200.0", - "@opentelemetry/otlp-transformer": "0.200.0", - "@opentelemetry/resources": "2.0.0", - "@opentelemetry/sdk-trace-base": "2.0.0" + "@opentelemetry/core": "2.0.1", + "@opentelemetry/otlp-exporter-base": "0.202.0", + "@opentelemetry/otlp-transformer": "0.202.0", + "@opentelemetry/resources": "2.0.1", + "@opentelemetry/sdk-trace-base": "2.0.1" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -3746,15 +3745,15 @@ } }, "node_modules/@opentelemetry/exporter-trace-otlp-proto": { - "version": "0.200.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-proto/-/exporter-trace-otlp-proto-0.200.0.tgz", - "integrity": "sha512-V9TDSD3PjK1OREw2iT9TUTzNYEVWJk4Nhodzhp9eiz4onDMYmPy3LaGbPv81yIR6dUb/hNp/SIhpiCHwFUq2Vg==", + "version": "0.202.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-proto/-/exporter-trace-otlp-proto-0.202.0.tgz", + "integrity": "sha512-z3vzdMclCETGIn8uUBgpz7w651ftCiH2qh3cewhBk+rF0EYPNQ3mJvyxktLnKIBZ/ci0zUknAzzYC7LIIZmggQ==", "dependencies": { - "@opentelemetry/core": "2.0.0", - "@opentelemetry/otlp-exporter-base": "0.200.0", - "@opentelemetry/otlp-transformer": "0.200.0", - "@opentelemetry/resources": "2.0.0", - "@opentelemetry/sdk-trace-base": "2.0.0" + "@opentelemetry/core": "2.0.1", + "@opentelemetry/otlp-exporter-base": "0.202.0", + "@opentelemetry/otlp-transformer": "0.202.0", + "@opentelemetry/resources": "2.0.1", + "@opentelemetry/sdk-trace-base": "2.0.1" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -3764,13 +3763,13 @@ } }, "node_modules/@opentelemetry/exporter-zipkin": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-zipkin/-/exporter-zipkin-2.0.0.tgz", - "integrity": "sha512-icxaKZ+jZL/NHXX8Aru4HGsrdhK0MLcuRXkX5G5IRmCgoRLw+Br6I/nMVozX2xjGGwV7hw2g+4Slj8K7s4HbVg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-zipkin/-/exporter-zipkin-2.0.1.tgz", + "integrity": "sha512-a9eeyHIipfdxzCfc2XPrE+/TI3wmrZUDFtG2RRXHSbZZULAny7SyybSvaDvS77a7iib5MPiAvluwVvbGTsHxsw==", "dependencies": { - "@opentelemetry/core": "2.0.0", - "@opentelemetry/resources": "2.0.0", - "@opentelemetry/sdk-trace-base": "2.0.0", + "@opentelemetry/core": "2.0.1", + "@opentelemetry/resources": "2.0.1", + "@opentelemetry/sdk-trace-base": "2.0.1", "@opentelemetry/semantic-conventions": "^1.29.0" }, "engines": { @@ -3781,15 +3780,13 @@ } }, "node_modules/@opentelemetry/instrumentation": { - "version": "0.200.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.200.0.tgz", - "integrity": "sha512-pmPlzfJd+vvgaZd/reMsC8RWgTXn2WY1OWT5RT42m3aOn5532TozwXNDhg1vzqJ+jnvmkREcdLr27ebJEQt0Jg==", + "version": "0.202.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.202.0.tgz", + "integrity": "sha512-Uz3BxZWPgDwgHM2+vCKEQRh0R8WKrd/q6Tus1vThRClhlPO39Dyz7mDrOr6KuqGXAlBQ1e5Tnymzri4RMZNaWA==", "dependencies": { - "@opentelemetry/api-logs": "0.200.0", - "@types/shimmer": "^1.2.0", + "@opentelemetry/api-logs": "0.202.0", "import-in-the-middle": "^1.8.1", - "require-in-the-middle": "^7.1.1", - "shimmer": "^1.2.1" + "require-in-the-middle": "^7.1.1" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -3799,12 +3796,12 @@ } }, "node_modules/@opentelemetry/instrumentation-amqplib": { - "version": "0.47.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-amqplib/-/instrumentation-amqplib-0.47.0.tgz", - "integrity": "sha512-bQboBxolOVDcD4l5QAwqKYpJVKQ8BW82+8tiD5uheu0hDuYgdmDziSAByc8yKS7xpkJw4AYocVP7JwSpQ1hgjg==", + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-amqplib/-/instrumentation-amqplib-0.49.0.tgz", + "integrity": "sha512-OCGkE+1JoUN+gOzs3u0GSa7GV//KX6NMKzaPchedae7ZwFVyyBQ8VECJngHgW3k/FLABFnq9Oiym2WZGiWugVQ==", "dependencies": { "@opentelemetry/core": "^2.0.0", - "@opentelemetry/instrumentation": "^0.200.0", + "@opentelemetry/instrumentation": "^0.202.0", "@opentelemetry/semantic-conventions": "^1.27.0" }, "engines": { @@ -3815,11 +3812,11 @@ } }, "node_modules/@opentelemetry/instrumentation-aws-lambda": { - "version": "0.51.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-aws-lambda/-/instrumentation-aws-lambda-0.51.0.tgz", - "integrity": "sha512-yPtnDum6vykhxA1xZ2kKc3DGmrLdbRAkJG0HiQUcOas47j716wmtqsLCctHyXgO0NpmS/BCzbUnOxxPG6kln7A==", + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-aws-lambda/-/instrumentation-aws-lambda-0.53.0.tgz", + "integrity": "sha512-dZywDIc4t7o28eU9W4QMB+mNhRdH5/kVxVmxRtB46/diHg8Im6RFncuiCVJ1l9ig/RUtwR3dU9LX1huFBwxkPw==", "dependencies": { - "@opentelemetry/instrumentation": "^0.200.0", + "@opentelemetry/instrumentation": "^0.202.0", "@opentelemetry/semantic-conventions": "^1.27.0", "@types/aws-lambda": "8.10.147" }, @@ -3831,14 +3828,14 @@ } }, "node_modules/@opentelemetry/instrumentation-aws-sdk": { - "version": "0.51.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-aws-sdk/-/instrumentation-aws-sdk-0.51.0.tgz", - "integrity": "sha512-NfmdJqrgJyAPGzPJk2bNl8vBn2kbDIHyTmKVNWhcQWh0VCA5aspi75Gsp5tHmLqk26VAtVtUEDZwK3nApFEtzw==", + "version": "0.54.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-aws-sdk/-/instrumentation-aws-sdk-0.54.0.tgz", + "integrity": "sha512-4XnXfpACX8fpOnt/D8d/1AFg3uOwBTG9TopQBuikDZJYUrLUSdT7UiotCFqAM/Z6hQJh72Jy3591C/OrmKct7A==", "dependencies": { "@opentelemetry/core": "^2.0.0", - "@opentelemetry/instrumentation": "^0.200.0", - "@opentelemetry/propagation-utils": "^0.31.0", - "@opentelemetry/semantic-conventions": "^1.27.0" + "@opentelemetry/instrumentation": "^0.202.0", + "@opentelemetry/propagation-utils": "^0.31.2", + "@opentelemetry/semantic-conventions": "^1.31.0" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -3848,12 +3845,12 @@ } }, "node_modules/@opentelemetry/instrumentation-bunyan": { - "version": "0.46.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-bunyan/-/instrumentation-bunyan-0.46.0.tgz", - "integrity": "sha512-7ERXBAMIVi1rtFG5odsLTLVy6IJZnLLB74fFlPstV7/ZZG04UZ8YFOYVS14jXArcPohY8HFYLbm56dIFCXYI9w==", + "version": "0.48.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-bunyan/-/instrumentation-bunyan-0.48.0.tgz", + "integrity": "sha512-Q6ay5CXIKuyejadPoLboz+jKumB3Zuxyk35ycFh9vfIeww3+mNRyMVj6KxHRS0Imbv9zhNbP3uyrUpvEMMyHuw==", "dependencies": { - "@opentelemetry/api-logs": "^0.200.0", - "@opentelemetry/instrumentation": "^0.200.0", + "@opentelemetry/api-logs": "^0.202.0", + "@opentelemetry/instrumentation": "^0.202.0", "@types/bunyan": "1.8.11" }, "engines": { @@ -3864,11 +3861,11 @@ } }, "node_modules/@opentelemetry/instrumentation-cassandra-driver": { - "version": "0.46.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-cassandra-driver/-/instrumentation-cassandra-driver-0.46.0.tgz", - "integrity": "sha512-ItT2C32afignjHQosleI/iBjzlHhF+F7tJIK9ty47/CceVNlA9oK39ss9f7o9jmnKvQfhNWffvkXdjc0afwnSQ==", + "version": "0.48.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-cassandra-driver/-/instrumentation-cassandra-driver-0.48.0.tgz", + "integrity": "sha512-0dcX8Kx0S6ZAOknrbA+BBh1j5lg5F20W18m5VYoGUxkuLIUbWkQA3uaqeTfqbOwmnBmb1upDPUWPR+g5N12B4Q==", "dependencies": { - "@opentelemetry/instrumentation": "^0.200.0", + "@opentelemetry/instrumentation": "^0.202.0", "@opentelemetry/semantic-conventions": "^1.27.0" }, "engines": { @@ -3879,12 +3876,12 @@ } }, "node_modules/@opentelemetry/instrumentation-connect": { - "version": "0.44.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-connect/-/instrumentation-connect-0.44.0.tgz", - "integrity": "sha512-eChFPViU/nkHsCYSp2PCnHnxt/ZmI/N5reHcwmjXbKhEj6TRNJcjLpI+OQksP8lLu0CS9DlDosHEhknCsxLdjQ==", + "version": "0.46.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-connect/-/instrumentation-connect-0.46.0.tgz", + "integrity": "sha512-YNq/7M1JXnWRkpKPC9dbYZA36cg547gY0p1bijW7vuZJ9t5f3alo6w8TWtZwV/hOFtBGHDXVhKVfp2Mh6zVHjQ==", "dependencies": { "@opentelemetry/core": "^2.0.0", - "@opentelemetry/instrumentation": "^0.200.0", + "@opentelemetry/instrumentation": "^0.202.0", "@opentelemetry/semantic-conventions": "^1.27.0", "@types/connect": "3.4.38" }, @@ -3896,11 +3893,11 @@ } }, "node_modules/@opentelemetry/instrumentation-cucumber": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-cucumber/-/instrumentation-cucumber-0.15.0.tgz", - "integrity": "sha512-MOHDzttn5TSBqt4j3/XjBhYNH0iLQP7oX2pumIzXP7dJFTcUtaq6PVakKPtIaqBTTabOKqCJhrF240XGwWefPQ==", + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-cucumber/-/instrumentation-cucumber-0.17.0.tgz", + "integrity": "sha512-TTfQ9DmUlbeBsYZjNdJqs8mlcn1uY3t/AsTsALDBEFg6tWV+S1ADM9kVmKnscfbCwcQX2x17f/6a1Kpq5p91ww==", "dependencies": { - "@opentelemetry/instrumentation": "^0.200.0", + "@opentelemetry/instrumentation": "^0.202.0", "@opentelemetry/semantic-conventions": "^1.27.0" }, "engines": { @@ -3911,11 +3908,11 @@ } }, "node_modules/@opentelemetry/instrumentation-dataloader": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-dataloader/-/instrumentation-dataloader-0.17.0.tgz", - "integrity": "sha512-JqovxOo7a65+3A/W+eiqUv7DrDsSvsY0NemHJ4uyVrzD4bpDYofVRdnz/ehYcNerlxVIKU+HcybDmiaoj41DPw==", + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-dataloader/-/instrumentation-dataloader-0.19.0.tgz", + "integrity": "sha512-zIVRnRs3zDZCqStQcpIdRx3Dz9WXFSVj9qimqI7CRuKao9qnrZYUVQHvvVlLZX3JAg+nDC6JRS95zvbq50hj4A==", "dependencies": { - "@opentelemetry/instrumentation": "^0.200.0" + "@opentelemetry/instrumentation": "^0.202.0" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -3925,11 +3922,11 @@ } }, "node_modules/@opentelemetry/instrumentation-dns": { - "version": "0.44.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-dns/-/instrumentation-dns-0.44.0.tgz", - "integrity": "sha512-+tAFXkFPldOpIba2akqKQ1ukqHET1pZ4pqhrr5x0p+RJ+1a1pPmTt1vCyvSSr634WOY8qMSmzZps++16yxnMbA==", + "version": "0.46.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-dns/-/instrumentation-dns-0.46.0.tgz", + "integrity": "sha512-m8u72x2fSIjhP1ITJX9Ims3eR4Qn8ze+QWy9NHYO01JlmiMamoc9TfIOd4dyOtxVja4tjnkWceKQdlEH9F9BoA==", "dependencies": { - "@opentelemetry/instrumentation": "^0.200.0" + "@opentelemetry/instrumentation": "^0.202.0" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -3939,12 +3936,12 @@ } }, "node_modules/@opentelemetry/instrumentation-express": { - "version": "0.48.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-express/-/instrumentation-express-0.48.0.tgz", - "integrity": "sha512-x9L6YD7AfE+7hysSv8k0d0sFmq3Vo3zoa/5eeJBYkGWHnD92CvekKouPyqUt71oX0htmZRdIawrhrwrAi2sonQ==", + "version": "0.51.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-express/-/instrumentation-express-0.51.0.tgz", + "integrity": "sha512-v1mgfvyeQh7yfsZ8wZlr+jgFGk9FxzLfNH0EH0UYGO9das8fCIkixsEasZMWhjwAJKjlf+ElTZ2jE2pT7I3DyQ==", "dependencies": { "@opentelemetry/core": "^2.0.0", - "@opentelemetry/instrumentation": "^0.200.0", + "@opentelemetry/instrumentation": "^0.202.0", "@opentelemetry/semantic-conventions": "^1.27.0" }, "engines": { @@ -3955,12 +3952,12 @@ } }, "node_modules/@opentelemetry/instrumentation-fastify": { - "version": "0.45.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-fastify/-/instrumentation-fastify-0.45.0.tgz", - "integrity": "sha512-m94anTFZ6jpvK0G5fXIiq1sB0gCgY2rAL7Cg7svuOh9Roya2RIQz2E5KfCsO1kWCmnHNeTo7wIofoGN7WLPvsA==", + "version": "0.47.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-fastify/-/instrumentation-fastify-0.47.0.tgz", + "integrity": "sha512-dLld0pI63WR1BXvNiGKFWzqrnhgItiIDNsRf/vVOhKV20HQNUQk5FfzcX0eUyiJtW/+u95Txh/vdfeQRwLELcA==", "dependencies": { "@opentelemetry/core": "^2.0.0", - "@opentelemetry/instrumentation": "^0.200.0", + "@opentelemetry/instrumentation": "^0.202.0", "@opentelemetry/semantic-conventions": "^1.27.0" }, "engines": { @@ -3971,12 +3968,12 @@ } }, "node_modules/@opentelemetry/instrumentation-fs": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-fs/-/instrumentation-fs-0.20.0.tgz", - "integrity": "sha512-30l45ovjwHb16ImCGVjKCvw5U7X1zKuYY26ii5S+goV8BZ4a/TCpBf2kQxteQjWD05Gl3fzPMZI5aScfPI6Rjw==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-fs/-/instrumentation-fs-0.22.0.tgz", + "integrity": "sha512-ktQVFD6pd8eAIW6t2DtDuXj2lxq+wnQ8WUkJLNZzl3rEE2TZEiHg7wIkWVoxl4Cz4pJ2YZJbdU2fHAizuDebDw==", "dependencies": { "@opentelemetry/core": "^2.0.0", - "@opentelemetry/instrumentation": "^0.200.0" + "@opentelemetry/instrumentation": "^0.202.0" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -3986,11 +3983,11 @@ } }, "node_modules/@opentelemetry/instrumentation-generic-pool": { - "version": "0.44.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-generic-pool/-/instrumentation-generic-pool-0.44.0.tgz", - "integrity": "sha512-bY7locZDqmQLEtY2fIJbSnAbHilxfhflaEQHjevFGkaiXc9UMtOvITOy5JKHhYQISpgrvY2WGXKG7YlVyI7uMg==", + "version": "0.46.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-generic-pool/-/instrumentation-generic-pool-0.46.0.tgz", + "integrity": "sha512-QJUH9n5Ld0xz54gX1k3L2RDoSyJjeZaASA17Zvm0uVa40v+s8oMfCa1/4y9TONFSVbL0fPbAGojVsRRtg6dJ5w==", "dependencies": { - "@opentelemetry/instrumentation": "^0.200.0" + "@opentelemetry/instrumentation": "^0.202.0" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -4000,11 +3997,11 @@ } }, "node_modules/@opentelemetry/instrumentation-graphql": { - "version": "0.48.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-graphql/-/instrumentation-graphql-0.48.0.tgz", - "integrity": "sha512-w1sbf9F9bQTpIWGnKWhH1A+9N9rKxS4eM+AzczgMWp272ZM9lQv4zLTrH5NRST2ltY3nmZ72wkfFrSR0rECi0g==", + "version": "0.50.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-graphql/-/instrumentation-graphql-0.50.0.tgz", + "integrity": "sha512-Nn3vBS5T0Dv4+9WF1dGR0Lgsxuz6ztQmTsxoHvesm6YAAXiHffnwsxBEJUKEJcjxfXzjO1SVuLDkv1bAeQ3NFw==", "dependencies": { - "@opentelemetry/instrumentation": "^0.200.0" + "@opentelemetry/instrumentation": "^0.202.0" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -4014,11 +4011,11 @@ } }, "node_modules/@opentelemetry/instrumentation-grpc": { - "version": "0.200.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-grpc/-/instrumentation-grpc-0.200.0.tgz", - "integrity": "sha512-iaPHlO1qb1WlGUq0oTx0rJND/BtBeTAtyEfflu2VwKDe8XZeia7UEOfiSQxnGqVSTwW5F0P1S5UzqeDJotreWQ==", + "version": "0.202.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-grpc/-/instrumentation-grpc-0.202.0.tgz", + "integrity": "sha512-dWvefHNAyAfaHVmxQ/ySLQSI2hGKLgK1sBtvae4w9xruqU08bBMtvmVeGMA/5whfiUDU8ftp1/84U4Zoe5N56A==", "dependencies": { - "@opentelemetry/instrumentation": "0.200.0", + "@opentelemetry/instrumentation": "0.202.0", "@opentelemetry/semantic-conventions": "^1.29.0" }, "engines": { @@ -4029,12 +4026,12 @@ } }, "node_modules/@opentelemetry/instrumentation-hapi": { - "version": "0.46.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-hapi/-/instrumentation-hapi-0.46.0.tgz", - "integrity": "sha512-573y+ZxywEcq+3+Z3KqcbV45lrVwUKvQiP9OhABVFNX8wHbtM6DPRBmYfqiUkSbIBcOEihm5qH6Gs73Xq0RBEA==", + "version": "0.48.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-hapi/-/instrumentation-hapi-0.48.0.tgz", + "integrity": "sha512-wFPhBK000+4422KUPZ3ojlUq4ZzMGo7/H6GBWCVZLsP65rGPbssUTBeucPL2rkMeM8RS5z3s+cjsghw7fwOduA==", "dependencies": { "@opentelemetry/core": "^2.0.0", - "@opentelemetry/instrumentation": "^0.200.0", + "@opentelemetry/instrumentation": "^0.202.0", "@opentelemetry/semantic-conventions": "^1.27.0" }, "engines": { @@ -4045,12 +4042,12 @@ } }, "node_modules/@opentelemetry/instrumentation-http": { - "version": "0.200.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-http/-/instrumentation-http-0.200.0.tgz", - "integrity": "sha512-9tqGbCJikhYU68y3k9mi6yWsMyMeCcwoQuHvIXan5VvvPPQ5WIZaV6Mxu/MCVe4swRNoFs8Th+qyj0TZV5ELvw==", + "version": "0.202.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-http/-/instrumentation-http-0.202.0.tgz", + "integrity": "sha512-oX+jyY2KBg4/nVH3vZhSWDbhywkHgE0fq3YinhUBx0jv+YUWC2UKA7qLkxr/CSzfKsFi/Km0NKV+llH17yYGKw==", "dependencies": { - "@opentelemetry/core": "2.0.0", - "@opentelemetry/instrumentation": "0.200.0", + "@opentelemetry/core": "2.0.1", + "@opentelemetry/instrumentation": "0.202.0", "@opentelemetry/semantic-conventions": "^1.29.0", "forwarded-parse": "2.1.2" }, @@ -4062,11 +4059,11 @@ } }, "node_modules/@opentelemetry/instrumentation-ioredis": { - "version": "0.48.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-ioredis/-/instrumentation-ioredis-0.48.0.tgz", - "integrity": "sha512-kQhdrn/CAfJIObqbyyGtagWNxPvglJ9FwnWmsfXKodaGskJv/nyvdC9yIcgwzjbkG1pokVUROrvJ0mizqm29Tg==", + "version": "0.50.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-ioredis/-/instrumentation-ioredis-0.50.0.tgz", + "integrity": "sha512-f2e+3xPxMRdlt1rjZpRhxuqrfumlWe3NX0Y+W857RBBV11HhbeZZaYbO5MMaxV3xBZv4dwPSGx96GjExUWY0WA==", "dependencies": { - "@opentelemetry/instrumentation": "^0.200.0", + "@opentelemetry/instrumentation": "^0.202.0", "@opentelemetry/redis-common": "^0.37.0", "@opentelemetry/semantic-conventions": "^1.27.0" }, @@ -4078,11 +4075,11 @@ } }, "node_modules/@opentelemetry/instrumentation-kafkajs": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-kafkajs/-/instrumentation-kafkajs-0.9.0.tgz", - "integrity": "sha512-Uxt/LTSmrzTYtnPpPn/L2W7+tjn38+v8tSnJ7hvaE3/aRXmZA5e72n+pHv0mlCI0pVNTihiQCUE62XYWPZ4jjA==", + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-kafkajs/-/instrumentation-kafkajs-0.11.0.tgz", + "integrity": "sha512-+i9VqVEPNObB1tkwcLV6zAafnve72h2Iwo48E11M/kVXMNXlgGhiYckYCmzba8c2u5XD/V98XZDrCIyO8CLCNA==", "dependencies": { - "@opentelemetry/instrumentation": "^0.200.0", + "@opentelemetry/instrumentation": "^0.202.0", "@opentelemetry/semantic-conventions": "^1.30.0" }, "engines": { @@ -4093,12 +4090,12 @@ } }, "node_modules/@opentelemetry/instrumentation-knex": { - "version": "0.45.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-knex/-/instrumentation-knex-0.45.0.tgz", - "integrity": "sha512-2kkyTDUzK/3G3jxTc+NqHSdgi1Mjw2irZ98T/cSyNdlbsnDOMSTHjbm0AxJCV4QYQ4cKW7a8W/BBgxDGlu+mXQ==", + "version": "0.47.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-knex/-/instrumentation-knex-0.47.0.tgz", + "integrity": "sha512-OjqjnzXD5+FXVGkOznbRAz9yByb4UWzIUhXjuHvOQ50IUY8mv3rM2Gj6Ar7m5JsENiS5DtAy2Vfwk4e9zNC0ng==", "dependencies": { - "@opentelemetry/instrumentation": "^0.200.0", - "@opentelemetry/semantic-conventions": "^1.27.0" + "@opentelemetry/instrumentation": "^0.202.0", + "@opentelemetry/semantic-conventions": "^1.33.1" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -4108,12 +4105,12 @@ } }, "node_modules/@opentelemetry/instrumentation-koa": { - "version": "0.48.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-koa/-/instrumentation-koa-0.48.0.tgz", - "integrity": "sha512-LV63v3pxFpjKC0IJO+y5nsGdcH+9Y8Wnn0fhu673XZ5auxqJk2t4nIHuSmls08oRKaX+5q1e+h70XmP/45NJsw==", + "version": "0.50.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-koa/-/instrumentation-koa-0.50.0.tgz", + "integrity": "sha512-JLVxvIWwH3XGGRfpYFOOdIctHCESKrWsdpNad0f95HdJhNVNPdEKloqWj6qHzvtDKJZ0UbEUcORhOr7xQB78JQ==", "dependencies": { "@opentelemetry/core": "^2.0.0", - "@opentelemetry/instrumentation": "^0.200.0", + "@opentelemetry/instrumentation": "^0.202.0", "@opentelemetry/semantic-conventions": "^1.27.0" }, "engines": { @@ -4124,11 +4121,11 @@ } }, "node_modules/@opentelemetry/instrumentation-lru-memoizer": { - "version": "0.45.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-lru-memoizer/-/instrumentation-lru-memoizer-0.45.0.tgz", - "integrity": "sha512-W2MNx7hPtvSIgEFxFrqdBykdfN0UrShCbJxvMU9fwgqbOdxIrcubPt0i1vmy3Ap6QwSi+HmsRNQD2w3ucbLG3A==", + "version": "0.47.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-lru-memoizer/-/instrumentation-lru-memoizer-0.47.0.tgz", + "integrity": "sha512-UJ2UlCAIF+N4zNkiHdMr4O0caN0K6YboAso3/zaFdG1QiPR2zqZcbWAGFBikZ9HSByU+NwbxTXDzlpkcDZIqWg==", "dependencies": { - "@opentelemetry/instrumentation": "^0.200.0" + "@opentelemetry/instrumentation": "^0.202.0" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -4138,11 +4135,11 @@ } }, "node_modules/@opentelemetry/instrumentation-memcached": { - "version": "0.44.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-memcached/-/instrumentation-memcached-0.44.0.tgz", - "integrity": "sha512-1zABdJlF9Tk0yUv2ELpF6Mk2kw81k+bnB3Sw+D/ssRDcGGCnCNbz+fKJE8dwAPkDP+OcTmiKm6ySREbcyRFzCg==", + "version": "0.46.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-memcached/-/instrumentation-memcached-0.46.0.tgz", + "integrity": "sha512-FFDcOVJUxZQqbg57gVskZGXRfEsZXwOvCaPv6/qIZRw5glLXPTulpnfG/s8NAltsj2buXSvS4eKFo+0HKH0apw==", "dependencies": { - "@opentelemetry/instrumentation": "^0.200.0", + "@opentelemetry/instrumentation": "^0.202.0", "@opentelemetry/semantic-conventions": "^1.27.0", "@types/memcached": "^2.2.6" }, @@ -4154,11 +4151,11 @@ } }, "node_modules/@opentelemetry/instrumentation-mongodb": { - "version": "0.53.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mongodb/-/instrumentation-mongodb-0.53.0.tgz", - "integrity": "sha512-zS2gQJQuG7RZw5yaNG/TnxsOtv1fFkn3ypuDrVLJtJLZtcOr4GYn31jbIA8od+QW/ChZLVcH364iDs+z/xS9wA==", + "version": "0.55.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mongodb/-/instrumentation-mongodb-0.55.0.tgz", + "integrity": "sha512-zWvT4gLZw/e6pvNGOOi+AM/qgLZoXjrnJW1Lh0qwrtpUoFZH4XUv/jgC+kfXsk034l9fggtfbhCfBboBiM8bAg==", "dependencies": { - "@opentelemetry/instrumentation": "^0.200.0", + "@opentelemetry/instrumentation": "^0.202.0", "@opentelemetry/semantic-conventions": "^1.27.0" }, "engines": { @@ -4169,12 +4166,12 @@ } }, "node_modules/@opentelemetry/instrumentation-mongoose": { - "version": "0.47.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mongoose/-/instrumentation-mongoose-0.47.0.tgz", - "integrity": "sha512-zg4ixMNmuACda75eOFa1m5h794zC9wp397stX0LAZvOylSb6dWT52P6ElkVQMV42C/27liEdQWxpabsamB+XPQ==", + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mongoose/-/instrumentation-mongoose-0.49.0.tgz", + "integrity": "sha512-nF+43QFe8IoW20TmTJZdxZhnVZGEglODUvzAo3fRmaBFAkwUXRGzRgABS255PCjIbScEaRRDCXc6EAsSkwRNPg==", "dependencies": { "@opentelemetry/core": "^2.0.0", - "@opentelemetry/instrumentation": "^0.200.0", + "@opentelemetry/instrumentation": "^0.202.0", "@opentelemetry/semantic-conventions": "^1.27.0" }, "engines": { @@ -4185,11 +4182,11 @@ } }, "node_modules/@opentelemetry/instrumentation-mysql": { - "version": "0.46.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mysql/-/instrumentation-mysql-0.46.0.tgz", - "integrity": "sha512-Z1NDAv07suIukgL7kxk9cAQX1t/smRMLNOU+q5Aqnhnf/0FIF/N4cX2wg+25IWy0m2PoaPbAVYCKB0aOt5vzAw==", + "version": "0.48.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mysql/-/instrumentation-mysql-0.48.0.tgz", + "integrity": "sha512-o7DwkkRn3eLWfzJdbXrlCS1EhbIOgB0W74eucbP+5Lk0XDGixy4yURTkmNclCcsemgzRZfEq0YvYQV29Yhpo5A==", "dependencies": { - "@opentelemetry/instrumentation": "^0.200.0", + "@opentelemetry/instrumentation": "^0.202.0", "@opentelemetry/semantic-conventions": "^1.27.0", "@types/mysql": "2.15.26" }, @@ -4201,11 +4198,11 @@ } }, "node_modules/@opentelemetry/instrumentation-mysql2": { - "version": "0.46.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mysql2/-/instrumentation-mysql2-0.46.0.tgz", - "integrity": "sha512-JsmIA+aTfHqy2tahjnVWChRipYpYrTy+XFAuUPia9CTaspCx8ZrirPUqYnbnaPEtnzYff2a4LX0B2LT1hKlOiA==", + "version": "0.48.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mysql2/-/instrumentation-mysql2-0.48.0.tgz", + "integrity": "sha512-eCRpv0WV2s0Pa6CpjPWzZiLZDqx8kqZJopJESd4ywoUwtijXzBiTRidp/8aL9k+kl4drhm2GVNr4thUCMlEOSA==", "dependencies": { - "@opentelemetry/instrumentation": "^0.200.0", + "@opentelemetry/instrumentation": "^0.202.0", "@opentelemetry/semantic-conventions": "^1.27.0", "@opentelemetry/sql-common": "^0.41.0" }, @@ -4217,11 +4214,11 @@ } }, "node_modules/@opentelemetry/instrumentation-nestjs-core": { - "version": "0.46.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-nestjs-core/-/instrumentation-nestjs-core-0.46.0.tgz", - "integrity": "sha512-5cYnBIMZuTSLFUt0pMH+NQNdI5/2YeCVuz29Mo2lkudbBUOvzGmzl/Y6LG1JEw2j6zuJx5IgO5CKNrJqAIzTWA==", + "version": "0.48.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-nestjs-core/-/instrumentation-nestjs-core-0.48.0.tgz", + "integrity": "sha512-ytK4ABSkWcD9vyMU8GpinvodAGaRxBFuxybP/m7sgLtEboXMJjdWnEHb7lH/CX1ICiVKRXWdYg9npdu6yBCW5Q==", "dependencies": { - "@opentelemetry/instrumentation": "^0.200.0", + "@opentelemetry/instrumentation": "^0.202.0", "@opentelemetry/semantic-conventions": "^1.30.0" }, "engines": { @@ -4232,11 +4229,11 @@ } }, "node_modules/@opentelemetry/instrumentation-net": { - "version": "0.44.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-net/-/instrumentation-net-0.44.0.tgz", - "integrity": "sha512-SmAbOKTi0lgdTN9XMXOaf+4jw670MpiK3pw9/to/kRlTvNWwWA4RD34trCcoL7Gf2IYoXuj56Oo4Z5C7N98ukw==", + "version": "0.46.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-net/-/instrumentation-net-0.46.0.tgz", + "integrity": "sha512-3ZJPuPd1ffCT3PRs6irjxVrOrFixXvCV/kykBe2Ahs/KT+kgYUSr6d6e4S1/ZQNXZKIQEwG2az0+VAw6Gr0e1w==", "dependencies": { - "@opentelemetry/instrumentation": "^0.200.0", + "@opentelemetry/instrumentation": "^0.202.0", "@opentelemetry/semantic-conventions": "^1.27.0" }, "engines": { @@ -4246,16 +4243,32 @@ "@opentelemetry/api": "^1.3.0" } }, + "node_modules/@opentelemetry/instrumentation-oracledb": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-oracledb/-/instrumentation-oracledb-0.28.0.tgz", + "integrity": "sha512-VObbQRd3g8nDLLOeGjm5l6TnB9dtEaJoedLfLwMGrlD6lkai+hdfalYh6FOF5dce+dJouZdW6NUUAaBj4f4KcA==", + "dependencies": { + "@opentelemetry/instrumentation": "^0.202.0", + "@opentelemetry/semantic-conventions": "^1.27.0", + "@types/oracledb": "6.5.2" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, "node_modules/@opentelemetry/instrumentation-pg": { - "version": "0.52.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-pg/-/instrumentation-pg-0.52.0.tgz", - "integrity": "sha512-OBpqlxTqmFkZGHaHV4Pzd95HkyKVS+vf0N5wVX3BSb8uqsvOrW62I1qt+2jNsZ13dtG5eOzvcsQTMGND76wizA==", + "version": "0.54.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-pg/-/instrumentation-pg-0.54.0.tgz", + "integrity": "sha512-KQnEGwm65p1zFZGjKGw+oMilGcR4l1q3qgRmETO7ySEfMddH3t6jwlbqmcjO3N3bVcPkYgjioGVQGvdpvz7O1w==", "dependencies": { "@opentelemetry/core": "^2.0.0", - "@opentelemetry/instrumentation": "^0.200.0", + "@opentelemetry/instrumentation": "^0.202.0", "@opentelemetry/semantic-conventions": "^1.27.0", "@opentelemetry/sql-common": "^0.41.0", - "@types/pg": "8.6.1", + "@types/pg": "8.15.1", "@types/pg-pool": "2.0.6" }, "engines": { @@ -4266,13 +4279,13 @@ } }, "node_modules/@opentelemetry/instrumentation-pino": { - "version": "0.47.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-pino/-/instrumentation-pino-0.47.0.tgz", - "integrity": "sha512-OFOy/TGtGXMYWrF4xPKhLN1evdqUpbuoKODzeh3GSjFkcooZZf4m/Hpzu12FV+s0wDBf43oAjXbNJWeCJQMrug==", + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-pino/-/instrumentation-pino-0.49.0.tgz", + "integrity": "sha512-nngcqUnIeVnDvRMf6fixYwlMbTNzCVGv93CacyR/8TL/pjyumje020PC5q7b6CfcTdToiD5GMTMKvWBiTd08cA==", "dependencies": { - "@opentelemetry/api-logs": "^0.200.0", + "@opentelemetry/api-logs": "^0.202.0", "@opentelemetry/core": "^2.0.0", - "@opentelemetry/instrumentation": "^0.200.0" + "@opentelemetry/instrumentation": "^0.202.0" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -4282,11 +4295,11 @@ } }, "node_modules/@opentelemetry/instrumentation-redis": { - "version": "0.47.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-redis/-/instrumentation-redis-0.47.0.tgz", - "integrity": "sha512-T2YvuX/LaJEQKgKvIQJlbSMSzxp6oBm+9PMgfn7QcBXzSY9tyeyDF6QjLAKNvxs+BJeQzFmDlahjoEyatzxRWA==", + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-redis/-/instrumentation-redis-0.49.0.tgz", + "integrity": "sha512-DUg7HjVG2j4T97NUBl92O3Gjcrbj+209wZ2zV3Z2y9CDi2zfAoSOboKqKRtZbVUB0Bx+LRTIFiKCMapE5cSzSQ==", "dependencies": { - "@opentelemetry/instrumentation": "^0.200.0", + "@opentelemetry/instrumentation": "^0.202.0", "@opentelemetry/redis-common": "^0.37.0", "@opentelemetry/semantic-conventions": "^1.27.0" }, @@ -4298,11 +4311,11 @@ } }, "node_modules/@opentelemetry/instrumentation-redis-4": { - "version": "0.47.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-redis-4/-/instrumentation-redis-4-0.47.0.tgz", - "integrity": "sha512-9LywJGp1fmmLj6g1+Rv91pVE3ATle1C/qIya9ZLwPywXTOdFIARI/gvvvlI7uFABoLojj2dSaI/5JQrq4C1HSg==", + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-redis-4/-/instrumentation-redis-4-0.49.0.tgz", + "integrity": "sha512-i+Wsl7M2LXEDA2yXouNJ3fttSzzb5AhlehvSBVRIFuinY51XrrKSH66biO0eox+pYQMwAlPxJ778XcMQffN78A==", "dependencies": { - "@opentelemetry/instrumentation": "^0.200.0", + "@opentelemetry/instrumentation": "^0.202.0", "@opentelemetry/redis-common": "^0.37.0", "@opentelemetry/semantic-conventions": "^1.27.0" }, @@ -4314,12 +4327,12 @@ } }, "node_modules/@opentelemetry/instrumentation-restify": { - "version": "0.46.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-restify/-/instrumentation-restify-0.46.0.tgz", - "integrity": "sha512-du1FjKsTGQH6q8QjG0Bxlg0L79Co/Ey0btKKb2sg7fvg0YX6LKdR2N1fzfne/A9k+WjQ5v28JuUXOk2cEPYU/Q==", + "version": "0.48.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-restify/-/instrumentation-restify-0.48.0.tgz", + "integrity": "sha512-iv9JTd0h3TYgeiuhB39ALv5s2X4YgL9Mtz0/nmF6f1aFCU9tY06K4f73VbPgq0/3yKwO+mPD7/W1xmB5D34VwQ==", "dependencies": { "@opentelemetry/core": "^2.0.0", - "@opentelemetry/instrumentation": "^0.200.0", + "@opentelemetry/instrumentation": "^0.202.0", "@opentelemetry/semantic-conventions": "^1.27.0" }, "engines": { @@ -4330,11 +4343,11 @@ } }, "node_modules/@opentelemetry/instrumentation-router": { - "version": "0.45.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-router/-/instrumentation-router-0.45.0.tgz", - "integrity": "sha512-CGEeT73Wy/nLQw+obG/mBCIgMbZQKrGG6hzbEdtQ4G2jqI97w7pLWdM4DvkpWVBNcxMpO13dX1nn2OiyZXND3Q==", + "version": "0.47.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-router/-/instrumentation-router-0.47.0.tgz", + "integrity": "sha512-U0zA1LTDqtTWyd5e4SdoqQA/8QUOhc4LDv9U7b+8FMFTty95OF84apUdatl09Dzc51XeWPWIV7VutmSCd/zsUg==", "dependencies": { - "@opentelemetry/instrumentation": "^0.200.0", + "@opentelemetry/instrumentation": "^0.202.0", "@opentelemetry/semantic-conventions": "^1.27.0" }, "engines": { @@ -4344,12 +4357,26 @@ "@opentelemetry/api": "^1.3.0" } }, - "node_modules/@opentelemetry/instrumentation-socket.io": { - "version": "0.47.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-socket.io/-/instrumentation-socket.io-0.47.0.tgz", - "integrity": "sha512-qAc+XCcRmZYjs8KJIPv+MMR2wPPPOppwoarzKRR4G+yvOBs1xMwbbkqNHifKga0XcfFX4KVr7Z5QQ6ZZzWyLtg==", + "node_modules/@opentelemetry/instrumentation-runtime-node": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-runtime-node/-/instrumentation-runtime-node-0.16.0.tgz", + "integrity": "sha512-Q/GB9LsKLrRCEIPLAQTDQvydnLmLXBSRkYkWzwKzY/LCkOs+Cl8YiJG08p6D4CaJ6lvP0iG4kwPHk1ydNbdehg==", "dependencies": { - "@opentelemetry/instrumentation": "^0.200.0", + "@opentelemetry/instrumentation": "^0.202.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-socket.io": { + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-socket.io/-/instrumentation-socket.io-0.49.0.tgz", + "integrity": "sha512-DpMtNBEcaLCcbP1WVBPCSgRiBs31igTQkal1gUm40VL/XAv5GUqRAUnvHZrQh3yPipOqzV65pdb0jJXdps/tug==", + "dependencies": { + "@opentelemetry/instrumentation": "^0.202.0", "@opentelemetry/semantic-conventions": "^1.27.0" }, "engines": { @@ -4360,11 +4387,11 @@ } }, "node_modules/@opentelemetry/instrumentation-tedious": { - "version": "0.19.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-tedious/-/instrumentation-tedious-0.19.0.tgz", - "integrity": "sha512-hNC/Bz+g4RvwaKsbA1VD+9x8X2Ml+fN2uba4dniIdQIrAItLdet4xx/7TEoWYtyVJQozphvpnIsUp52Rw4djCA==", + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-tedious/-/instrumentation-tedious-0.21.0.tgz", + "integrity": "sha512-pt37kHYGQ8D2vBOQwyB/TKUqLPF8Q4rfTNu3whZsPOsc6QHDPXpfQISIupWAnMjAaeujF/Spg6IA04W6jXrzRQ==", "dependencies": { - "@opentelemetry/instrumentation": "^0.200.0", + "@opentelemetry/instrumentation": "^0.202.0", "@opentelemetry/semantic-conventions": "^1.27.0", "@types/tedious": "^4.0.14" }, @@ -4376,12 +4403,12 @@ } }, "node_modules/@opentelemetry/instrumentation-undici": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-undici/-/instrumentation-undici-0.11.0.tgz", - "integrity": "sha512-H6ijJnKVZBB0Lhm6NsaBt0rUz+i52LriLhrpGAE8SazB0jCIVY4MrL2dNib/4w8zA+Fw9zFwERJvKXUIbSD1ew==", + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-undici/-/instrumentation-undici-0.13.0.tgz", + "integrity": "sha512-FwIDJSzA3Kv88oSf9JF6rzhjJc1Q0f30m4Q7IwOUQo0aTGPGM4J0pm6ZbgZ5TvfhnL3KvKnS9rzv0MJ1yUkGmA==", "dependencies": { "@opentelemetry/core": "^2.0.0", - "@opentelemetry/instrumentation": "^0.200.0" + "@opentelemetry/instrumentation": "^0.202.0" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -4391,12 +4418,12 @@ } }, "node_modules/@opentelemetry/instrumentation-winston": { - "version": "0.45.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-winston/-/instrumentation-winston-0.45.0.tgz", - "integrity": "sha512-LZz3/6QvzoneSqD/xnB8wq/g1fy8oe2PwfZ15zS2YA5mnjuSqlqgl+k3sib7wfIYHMP1D3ajfbDB6UOJBALj/w==", + "version": "0.47.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-winston/-/instrumentation-winston-0.47.0.tgz", + "integrity": "sha512-r+GqnZU/aFldQyB5QdOlxsMlH9KZ4+zJfnYplz3lbC9f9ozAIlVAeoshvWTtbv7Oxp2NnK64EfnNP1pClaGEqA==", "dependencies": { - "@opentelemetry/api-logs": "^0.200.0", - "@opentelemetry/instrumentation": "^0.200.0" + "@opentelemetry/api-logs": "^0.202.0", + "@opentelemetry/instrumentation": "^0.202.0" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -4406,12 +4433,12 @@ } }, "node_modules/@opentelemetry/otlp-exporter-base": { - "version": "0.200.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.200.0.tgz", - "integrity": "sha512-IxJgA3FD7q4V6gGq4bnmQM5nTIyMDkoGFGrBrrDjB6onEiq1pafma55V+bHvGYLWvcqbBbRfezr1GED88lacEQ==", + "version": "0.202.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.202.0.tgz", + "integrity": "sha512-nMEOzel+pUFYuBJg2znGmHJWbmvMbdX5/RhoKNKowguMbURhz0fwik5tUKplLcUtl8wKPL1y9zPnPxeBn65N0Q==", "dependencies": { - "@opentelemetry/core": "2.0.0", - "@opentelemetry/otlp-transformer": "0.200.0" + "@opentelemetry/core": "2.0.1", + "@opentelemetry/otlp-transformer": "0.202.0" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -4421,14 +4448,14 @@ } }, "node_modules/@opentelemetry/otlp-grpc-exporter-base": { - "version": "0.200.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-grpc-exporter-base/-/otlp-grpc-exporter-base-0.200.0.tgz", - "integrity": "sha512-CK2S+bFgOZ66Bsu5hlDeOX6cvW5FVtVjFFbWuaJP0ELxJKBB6HlbLZQ2phqz/uLj1cWap5xJr/PsR3iGoB7Vqw==", + "version": "0.202.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-grpc-exporter-base/-/otlp-grpc-exporter-base-0.202.0.tgz", + "integrity": "sha512-yIEHVxFA5dmYif7lZbbB66qulLLhrklj6mI2X3cuGW5hYPyUErztEmbroM+6teu/XobBi9bLHid2VT4NIaRuGg==", "dependencies": { "@grpc/grpc-js": "^1.7.1", - "@opentelemetry/core": "2.0.0", - "@opentelemetry/otlp-exporter-base": "0.200.0", - "@opentelemetry/otlp-transformer": "0.200.0" + "@opentelemetry/core": "2.0.1", + "@opentelemetry/otlp-exporter-base": "0.202.0", + "@opentelemetry/otlp-transformer": "0.202.0" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -4438,16 +4465,16 @@ } }, "node_modules/@opentelemetry/otlp-transformer": { - "version": "0.200.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.200.0.tgz", - "integrity": "sha512-+9YDZbYybOnv7sWzebWOeK6gKyt2XE7iarSyBFkwwnP559pEevKOUD8NyDHhRjCSp13ybh9iVXlMfcj/DwF/yw==", + "version": "0.202.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.202.0.tgz", + "integrity": "sha512-5XO77QFzs9WkexvJQL9ksxL8oVFb/dfi9NWQSq7Sv0Efr9x3N+nb1iklP1TeVgxqJ7m1xWiC/Uv3wupiQGevMw==", "dependencies": { - "@opentelemetry/api-logs": "0.200.0", - "@opentelemetry/core": "2.0.0", - "@opentelemetry/resources": "2.0.0", - "@opentelemetry/sdk-logs": "0.200.0", - "@opentelemetry/sdk-metrics": "2.0.0", - "@opentelemetry/sdk-trace-base": "2.0.0", + "@opentelemetry/api-logs": "0.202.0", + "@opentelemetry/core": "2.0.1", + "@opentelemetry/resources": "2.0.1", + "@opentelemetry/sdk-logs": "0.202.0", + "@opentelemetry/sdk-metrics": "2.0.1", + "@opentelemetry/sdk-trace-base": "2.0.1", "protobufjs": "^7.3.0" }, "engines": { @@ -4458,9 +4485,9 @@ } }, "node_modules/@opentelemetry/propagation-utils": { - "version": "0.31.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/propagation-utils/-/propagation-utils-0.31.0.tgz", - "integrity": "sha512-Gnxes8Mwm7BwLCDobUD1A5YoFWIKDch6WQWvO+jc0uvfI4vujDExVghbGg5sTJhHc2Sg2cU0+ANgV/jUjdS79w==", + "version": "0.31.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/propagation-utils/-/propagation-utils-0.31.2.tgz", + "integrity": "sha512-FlJzdZ0cQY8qqOsJ/A+L/t05LvZtnsMq6vbamunVMYRi9TAy+xq37t+nT/dx3dKJ/2k409jDj9eA0Yhj9RtTug==", "engines": { "node": "^18.19.0 || >=20.6.0" }, @@ -4469,11 +4496,11 @@ } }, "node_modules/@opentelemetry/propagator-b3": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-2.0.0.tgz", - "integrity": "sha512-blx9S2EI49Ycuw6VZq+bkpaIoiJFhsDuvFGhBIoH3vJ5oYjJ2U0s3fAM5jYft99xVIAv6HqoPtlP9gpVA2IZtA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-2.0.1.tgz", + "integrity": "sha512-Hc09CaQ8Tf5AGLmf449H726uRoBNGPBL4bjr7AnnUpzWMvhdn61F78z9qb6IqB737TffBsokGAK1XykFEZ1igw==", "dependencies": { - "@opentelemetry/core": "2.0.0" + "@opentelemetry/core": "2.0.1" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -4483,11 +4510,11 @@ } }, "node_modules/@opentelemetry/propagator-jaeger": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-jaeger/-/propagator-jaeger-2.0.0.tgz", - "integrity": "sha512-Mbm/LSFyAtQKP0AQah4AfGgsD+vsZcyreZoQ5okFBk33hU7AquU4TltgyL9dvaO8/Zkoud8/0gEvwfOZ5d7EPA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-jaeger/-/propagator-jaeger-2.0.1.tgz", + "integrity": "sha512-7PMdPBmGVH2eQNb/AtSJizQNgeNTfh6jQFqys6lfhd6P4r+m/nTh3gKPPpaCXVdRQ+z93vfKk+4UGty390283w==", "dependencies": { - "@opentelemetry/core": "2.0.0" + "@opentelemetry/core": "2.0.1" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -4505,9 +4532,9 @@ } }, "node_modules/@opentelemetry/resource-detector-alibaba-cloud": { - "version": "0.31.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/resource-detector-alibaba-cloud/-/resource-detector-alibaba-cloud-0.31.0.tgz", - "integrity": "sha512-Ty3GkSnht10UySMdHC1ngwGEYMbTBxt0/PMpjwbM6ibxkgf57apx04cSeHVm9TwBE/vm9+4/zt4RciCqyWQwtA==", + "version": "0.31.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/resource-detector-alibaba-cloud/-/resource-detector-alibaba-cloud-0.31.2.tgz", + "integrity": "sha512-Itp6duMXkAIQzmDHIf1kc6Llj/fa0BxilaELp0K6Fp9y+b0ex9LksNAQfTDFPHNine7tFoXauvvHbJFXIB6mqw==", "dependencies": { "@opentelemetry/core": "^2.0.0", "@opentelemetry/resources": "^2.0.0", @@ -4521,9 +4548,9 @@ } }, "node_modules/@opentelemetry/resource-detector-aws": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/resource-detector-aws/-/resource-detector-aws-2.0.0.tgz", - "integrity": "sha512-jvHvLAXzFPJJhj0AdbMOpup+Fchef32sHM1Suj4NgJGKxTO47T84i5OjKiG/81YEoCaKmlTefezNbuaGCrPd3w==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/resource-detector-aws/-/resource-detector-aws-2.2.0.tgz", + "integrity": "sha512-6k7//RWAv4U1PeZhv0Too0Sv7sp7/A6s6g9h5ZYauPcroh2t4gOmkQSspSLYCynn34YZwn3FGbuaMwTDjHEJig==", "dependencies": { "@opentelemetry/core": "^2.0.0", "@opentelemetry/resources": "^2.0.0", @@ -4537,9 +4564,9 @@ } }, "node_modules/@opentelemetry/resource-detector-azure": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/resource-detector-azure/-/resource-detector-azure-0.7.0.tgz", - "integrity": "sha512-aR2ALsK+b/+5lLDhK9KTK8rcuKg7+sqa/Cg+QCeasqoy7qby70FRtAbQcZGljJ5BLBcVPYjl1hcTYIUyL3Laww==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/resource-detector-azure/-/resource-detector-azure-0.9.0.tgz", + "integrity": "sha512-5wJwAAW2vhbqIhgaRisU1y0F5mUco59F/dKgmnnnT6YNbxjrbdUZYxKF5Wl7deJoACVdL5wi/3N97GCXPEwwCQ==", "dependencies": { "@opentelemetry/core": "^2.0.0", "@opentelemetry/resources": "^2.0.0", @@ -4553,9 +4580,9 @@ } }, "node_modules/@opentelemetry/resource-detector-container": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/resource-detector-container/-/resource-detector-container-0.7.0.tgz", - "integrity": "sha512-B6DmocHE6bCJt6Iy6z7p+ESjrp7WI4MJN2jWa2MBj9UEZ60Mj/q4BZ8qv0NSmcOYuJhjykNqCUmA+dAOnQn/Kw==", + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/resource-detector-container/-/resource-detector-container-0.7.2.tgz", + "integrity": "sha512-St3Krrbpvq7k0UoUNlm7Z4Xqf9HdS9R5yPslwl/WPaZpj/Bf/54WZTPmNQat+93Ey6PTX0ISKg26DfcjPemUhg==", "dependencies": { "@opentelemetry/core": "^2.0.0", "@opentelemetry/resources": "^2.0.0", @@ -4569,9 +4596,9 @@ } }, "node_modules/@opentelemetry/resource-detector-gcp": { - "version": "0.34.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/resource-detector-gcp/-/resource-detector-gcp-0.34.0.tgz", - "integrity": "sha512-Mug9Oing1nVQE8pYT33UKuPSEa/wjQTMk3feS9F84h4U7oZIx5Mz3yddj3OHOPgrW/7d1Ve/mG7jmYqBI9tpTg==", + "version": "0.36.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/resource-detector-gcp/-/resource-detector-gcp-0.36.0.tgz", + "integrity": "sha512-mWnEcg4tA+IDPrkETWo42psEsDN20dzYZSm4ZH8m8uiQALnNksVmf5C3An0GUEj5zrrxMasjSuv4zEH1gI40XQ==", "dependencies": { "@opentelemetry/core": "^2.0.0", "@opentelemetry/resources": "^2.0.0", @@ -4586,11 +4613,11 @@ } }, "node_modules/@opentelemetry/resources": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.0.tgz", - "integrity": "sha512-rnZr6dML2z4IARI4zPGQV4arDikF/9OXZQzrC01dLmn0CZxU5U5OLd/m1T7YkGRj5UitjeoCtg/zorlgMQcdTg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz", + "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==", "dependencies": { - "@opentelemetry/core": "2.0.0", + "@opentelemetry/core": "2.0.1", "@opentelemetry/semantic-conventions": "^1.29.0" }, "engines": { @@ -4601,13 +4628,13 @@ } }, "node_modules/@opentelemetry/sdk-logs": { - "version": "0.200.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.200.0.tgz", - "integrity": "sha512-VZG870063NLfObmQQNtCVcdXXLzI3vOjjrRENmU37HYiPFa0ZXpXVDsTD02Nh3AT3xYJzQaWKl2X2lQ2l7TWJA==", + "version": "0.202.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.202.0.tgz", + "integrity": "sha512-pv8QiQLQzk4X909YKm0lnW4hpuQg4zHwJ4XBd5bZiXcd9urvrJNoNVKnxGHPiDVX/GiLFvr5DMYsDBQbZCypRQ==", "dependencies": { - "@opentelemetry/api-logs": "0.200.0", - "@opentelemetry/core": "2.0.0", - "@opentelemetry/resources": "2.0.0" + "@opentelemetry/api-logs": "0.202.0", + "@opentelemetry/core": "2.0.1", + "@opentelemetry/resources": "2.0.1" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -4617,12 +4644,12 @@ } }, "node_modules/@opentelemetry/sdk-metrics": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.0.0.tgz", - "integrity": "sha512-Bvy8QDjO05umd0+j+gDeWcTaVa1/R2lDj/eOvjzpm8VQj1K1vVZJuyjThpV5/lSHyYW2JaHF2IQ7Z8twJFAhjA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.0.1.tgz", + "integrity": "sha512-wf8OaJoSnujMAHWR3g+/hGvNcsC16rf9s1So4JlMiFaFHiE4HpIA3oUh+uWZQ7CNuK8gVW/pQSkgoa5HkkOl0g==", "dependencies": { - "@opentelemetry/core": "2.0.0", - "@opentelemetry/resources": "2.0.0" + "@opentelemetry/core": "2.0.1", + "@opentelemetry/resources": "2.0.1" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -4632,31 +4659,31 @@ } }, "node_modules/@opentelemetry/sdk-node": { - "version": "0.200.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-node/-/sdk-node-0.200.0.tgz", - "integrity": "sha512-S/YSy9GIswnhYoDor1RusNkmRughipvTCOQrlF1dzI70yQaf68qgf5WMnzUxdlCl3/et/pvaO75xfPfuEmCK5A==", + "version": "0.202.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-node/-/sdk-node-0.202.0.tgz", + "integrity": "sha512-SF9vXWVd9I5CZ69mW3GfwfLI2SHgyvEqntcg0en5y8kRp5+2PPoa3Mkgj0WzFLrbSgTw4PsXn7c7H6eSdrtV0w==", "dependencies": { - "@opentelemetry/api-logs": "0.200.0", - "@opentelemetry/core": "2.0.0", - "@opentelemetry/exporter-logs-otlp-grpc": "0.200.0", - "@opentelemetry/exporter-logs-otlp-http": "0.200.0", - "@opentelemetry/exporter-logs-otlp-proto": "0.200.0", - "@opentelemetry/exporter-metrics-otlp-grpc": "0.200.0", - "@opentelemetry/exporter-metrics-otlp-http": "0.200.0", - "@opentelemetry/exporter-metrics-otlp-proto": "0.200.0", - "@opentelemetry/exporter-prometheus": "0.200.0", - "@opentelemetry/exporter-trace-otlp-grpc": "0.200.0", - "@opentelemetry/exporter-trace-otlp-http": "0.200.0", - "@opentelemetry/exporter-trace-otlp-proto": "0.200.0", - "@opentelemetry/exporter-zipkin": "2.0.0", - "@opentelemetry/instrumentation": "0.200.0", - "@opentelemetry/propagator-b3": "2.0.0", - "@opentelemetry/propagator-jaeger": "2.0.0", - "@opentelemetry/resources": "2.0.0", - "@opentelemetry/sdk-logs": "0.200.0", - "@opentelemetry/sdk-metrics": "2.0.0", - "@opentelemetry/sdk-trace-base": "2.0.0", - "@opentelemetry/sdk-trace-node": "2.0.0", + "@opentelemetry/api-logs": "0.202.0", + "@opentelemetry/core": "2.0.1", + "@opentelemetry/exporter-logs-otlp-grpc": "0.202.0", + "@opentelemetry/exporter-logs-otlp-http": "0.202.0", + "@opentelemetry/exporter-logs-otlp-proto": "0.202.0", + "@opentelemetry/exporter-metrics-otlp-grpc": "0.202.0", + "@opentelemetry/exporter-metrics-otlp-http": "0.202.0", + "@opentelemetry/exporter-metrics-otlp-proto": "0.202.0", + "@opentelemetry/exporter-prometheus": "0.202.0", + "@opentelemetry/exporter-trace-otlp-grpc": "0.202.0", + "@opentelemetry/exporter-trace-otlp-http": "0.202.0", + "@opentelemetry/exporter-trace-otlp-proto": "0.202.0", + "@opentelemetry/exporter-zipkin": "2.0.1", + "@opentelemetry/instrumentation": "0.202.0", + "@opentelemetry/propagator-b3": "2.0.1", + "@opentelemetry/propagator-jaeger": "2.0.1", + "@opentelemetry/resources": "2.0.1", + "@opentelemetry/sdk-logs": "0.202.0", + "@opentelemetry/sdk-metrics": "2.0.1", + "@opentelemetry/sdk-trace-base": "2.0.1", + "@opentelemetry/sdk-trace-node": "2.0.1", "@opentelemetry/semantic-conventions": "^1.29.0" }, "engines": { @@ -4667,12 +4694,12 @@ } }, "node_modules/@opentelemetry/sdk-trace-base": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.0.0.tgz", - "integrity": "sha512-qQnYdX+ZCkonM7tA5iU4fSRsVxbFGml8jbxOgipRGMFHKaXKHQ30js03rTobYjKjIfnOsZSbHKWF0/0v0OQGfw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.0.1.tgz", + "integrity": "sha512-xYLlvk/xdScGx1aEqvxLwf6sXQLXCjk3/1SQT9X9AoN5rXRhkdvIFShuNNmtTEPRBqcsMbS4p/gJLNI2wXaDuQ==", "dependencies": { - "@opentelemetry/core": "2.0.0", - "@opentelemetry/resources": "2.0.0", + "@opentelemetry/core": "2.0.1", + "@opentelemetry/resources": "2.0.1", "@opentelemetry/semantic-conventions": "^1.29.0" }, "engines": { @@ -4683,13 +4710,13 @@ } }, "node_modules/@opentelemetry/sdk-trace-node": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-2.0.0.tgz", - "integrity": "sha512-omdilCZozUjQwY3uZRBwbaRMJ3p09l4t187Lsdf0dGMye9WKD4NGcpgZRvqhI1dwcH6og+YXQEtoO9Wx3ykilg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-2.0.1.tgz", + "integrity": "sha512-UhdbPF19pMpBtCWYP5lHbTogLWx9N0EBxtdagvkn5YtsAnCBZzL7SjktG+ZmupRgifsHMjwUaCCaVmqGfSADmA==", "dependencies": { - "@opentelemetry/context-async-hooks": "2.0.0", - "@opentelemetry/core": "2.0.0", - "@opentelemetry/sdk-trace-base": "2.0.0" + "@opentelemetry/context-async-hooks": "2.0.1", + "@opentelemetry/core": "2.0.1", + "@opentelemetry/sdk-trace-base": "2.0.1" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -4699,9 +4726,9 @@ } }, "node_modules/@opentelemetry/semantic-conventions": { - "version": "1.31.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.31.0.tgz", - "integrity": "sha512-cYJeP+6qN0UnBv1r09hXl0YorB8kXHv61BC0NUlBA8vxrylZ4/C8lnva3gd1E8n33DNYSaiGW+DuGoSt0QQ7Dw==", + "version": "1.34.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.34.0.tgz", + "integrity": "sha512-aKcOkyrorBGlajjRdVoJWHTxfxO1vCNHLJVlSDaRHDIdjU+pX8IYQPvPDkYiujKLbRnWU+1TBwEt0QRgSm4SGA==", "engines": { "node": ">=14" } @@ -5474,14 +5501,22 @@ "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==" }, + "node_modules/@types/oracledb": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@types/oracledb/-/oracledb-6.5.2.tgz", + "integrity": "sha512-kK1eBS/Adeyis+3OlBDMeQQuasIDLUYXsi2T15ccNJ0iyUpQ4xDF7svFu3+bGVrI0CMBUclPciz+lsQR3JX3TQ==", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/pg": { - "version": "8.6.1", - "resolved": "https://registry.npmjs.org/@types/pg/-/pg-8.6.1.tgz", - "integrity": "sha512-1Kc4oAGzAl7uqUStZCDvaLFqZrW9qWSjXOmBfdgyBP5La7Us6Mg4GBvRlSoaZMhQF/zSj1C8CtKMBkoiT8eL8w==", + "version": "8.15.1", + "resolved": "https://registry.npmjs.org/@types/pg/-/pg-8.15.1.tgz", + "integrity": "sha512-YKHrkGWBX5+ivzvOQ66I0fdqsQTsvxqM0AGP2i0XrVZ9DP5VA/deEbTf7VuLPGpY7fJB9uGbkZ6KjVhuHcrTkQ==", "dependencies": { "@types/node": "*", "pg-protocol": "*", - "pg-types": "^2.2.0" + "pg-types": "^4.0.1" } }, "node_modules/@types/pg-pool": { @@ -5492,6 +5527,58 @@ "@types/pg": "*" } }, + "node_modules/@types/pg/node_modules/pg-types": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-4.0.2.tgz", + "integrity": "sha512-cRL3JpS3lKMGsKaWndugWQoLOCoP+Cic8oseVcbr0qhPzYD5DWXK+RZ9LY9wxRf7RQia4SCwQlXk0q6FCPrVng==", + "dependencies": { + "pg-int8": "1.0.1", + "pg-numeric": "1.0.2", + "postgres-array": "~3.0.1", + "postgres-bytea": "~3.0.0", + "postgres-date": "~2.1.0", + "postgres-interval": "^3.0.0", + "postgres-range": "^1.1.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@types/pg/node_modules/postgres-array": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-3.0.4.tgz", + "integrity": "sha512-nAUSGfSDGOaOAEGwqsRY27GPOea7CNipJPOA7lPbdEpx5Kg3qzdP0AaWC5MlhTWV9s4hFX39nomVZ+C4tnGOJQ==", + "engines": { + "node": ">=12" + } + }, + "node_modules/@types/pg/node_modules/postgres-bytea": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-3.0.0.tgz", + "integrity": "sha512-CNd4jim9RFPkObHSjVHlVrxoVQXz7quwNFpz7RY1okNNme49+sVyiTvTRobiLV548Hx/hb1BG+iE7h9493WzFw==", + "dependencies": { + "obuf": "~1.1.2" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/@types/pg/node_modules/postgres-date": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-2.1.0.tgz", + "integrity": "sha512-K7Juri8gtgXVcDfZttFKVmhglp7epKb1K4pgrkLxehjqkrgPhfG6OO8LHLkfaqkbpjNRnra018XwAr1yQFWGcA==", + "engines": { + "node": ">=12" + } + }, + "node_modules/@types/pg/node_modules/postgres-interval": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-3.0.0.tgz", + "integrity": "sha512-BSNDnbyZCXSxgA+1f5UU2GmwhoI0aU5yMxRGO8CdFEcY2BQF9xm/7MqKnYoM1nJDk8nONNWDk9WeSmePFhQdlw==", + "engines": { + "node": ">=12" + } + }, "node_modules/@types/qs": { "version": "6.9.18", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.18.tgz", @@ -5526,11 +5613,6 @@ "@types/send": "*" } }, - "node_modules/@types/shimmer": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@types/shimmer/-/shimmer-1.2.0.tgz", - "integrity": "sha512-UE7oxhQLLd9gub6JKIAhDq06T0F6FnztwMNRvYgjeQSBeMc1ZG/tA47EwfduvkuQS8apbkM/lpLpWsaCeYsXVg==" - }, "node_modules/@types/stack-utils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", @@ -6460,9 +6542,9 @@ ] }, "node_modules/bignumber.js": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.2.1.tgz", - "integrity": "sha512-+NzaKgOUvInq9TIUZ1+DRspzf/HApkCwD4btfuasFTdrfnOxqx853TgDpMolp+uv4RpRp7bPcEU2zKr9+fRmyw==", + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.3.0.tgz", + "integrity": "sha512-EM7aMFTXbptt/wZdMlBv2t8IViwQL+h6SLHosp8Yf0dqJMTnY6iL32opnAB6kAdL0SZPuvcAzFr31o0c/R3/RA==", "engines": { "node": "*" } @@ -9131,9 +9213,9 @@ } }, "node_modules/import-in-the-middle": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-1.13.1.tgz", - "integrity": "sha512-k2V9wNm9B+ysuelDTHjI9d5KPc4l8zAZTGqj+pcynvWkypZd857ryzN8jNC7Pg2YZXNMJcHRPpaDyCBbNyVRpA==", + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-1.14.0.tgz", + "integrity": "sha512-g5zLT0HaztRJWysayWYiUq/7E5H825QIiecMD2pI5QO7Wzr847l6GDvPvmZaDIdrDtS2w7qRczywxiK6SL5vRw==", "dependencies": { "acorn": "^8.14.0", "acorn-import-attributes": "^1.9.5", @@ -10680,9 +10762,9 @@ } }, "node_modules/module-details-from-path": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/module-details-from-path/-/module-details-from-path-1.0.3.tgz", - "integrity": "sha512-ySViT69/76t8VhE1xXHK6Ch4NcDd26gx0MzKXLO+F7NOtnqH68d9zF94nT8ZWSxXh8ELOERsnJO/sWt1xZYw5A==" + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/module-details-from-path/-/module-details-from-path-1.0.4.tgz", + "integrity": "sha512-EGWKgxALGMgzvxYF1UyGTy0HXX/2vHLkw6+NvDKW2jypWbHpjQuj4UMcqQWXHERJhVGKikolT06G3bcKe4fi7w==" }, "node_modules/ms": { "version": "2.1.3", @@ -10911,6 +10993,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/obuf": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", + "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==" + }, "node_modules/on-finished": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", @@ -11268,6 +11355,14 @@ "node": ">=4.0.0" } }, + "node_modules/pg-numeric": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pg-numeric/-/pg-numeric-1.0.2.tgz", + "integrity": "sha512-BM/Thnrw5jm2kKLE5uJkXqqExRUY/toLHda65XgFTBTFYZyopbKjBe29Ii3RbkvlsMoFwD+tHeGaCjjv0gHlyw==", + "engines": { + "node": ">=4" + } + }, "node_modules/pg-pool": { "version": "3.8.0", "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.8.0.tgz", @@ -11433,6 +11528,11 @@ "node": ">=0.10.0" } }, + "node_modules/postgres-range": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/postgres-range/-/postgres-range-1.1.4.tgz", + "integrity": "sha512-i/hbxIE9803Alj/6ytL7UHQxRvZkI9O4Sy+J3HGc4F4oo/2eQAjTSNJ0bfxyse3bH0nuVesCk+3IRLaMtG3H6w==" + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -11572,9 +11672,9 @@ } }, "node_modules/protobufjs": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.4.0.tgz", - "integrity": "sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw==", + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.5.3.tgz", + "integrity": "sha512-sildjKwVqOI2kmFDiXQ6aEB0fjYTafpEvIBs8tOR8qI4spuL9OPROLVu2qZqi/xgCfsHIwVqlaF8JBjWFHnKbw==", "hasInstallScript": true, "dependencies": { "@protobufjs/aspromise": "^1.1.2", @@ -11595,9 +11695,9 @@ } }, "node_modules/protobufjs/node_modules/long": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/long/-/long-5.3.1.tgz", - "integrity": "sha512-ka87Jz3gcx/I7Hal94xaN2tZEOPoUOEVftkQqZx2EeQRN7LGdfLlI3FvZ+7WDplm+vK2Urx9ULrvSowtdCieng==" + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", + "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==" }, "node_modules/proxy-addr": { "version": "2.0.7", @@ -12297,11 +12397,6 @@ "node": ">=8" } }, - "node_modules/shimmer": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/shimmer/-/shimmer-1.2.1.tgz", - "integrity": "sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw==" - }, "node_modules/side-channel": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", diff --git a/service/data-hub/data-connector/package.json b/service/data-hub/data-connector/package.json index f288ac3..3ab7001 100644 --- a/service/data-hub/data-connector/package.json +++ b/service/data-hub/data-connector/package.json @@ -35,12 +35,9 @@ "@nestjs/platform-express": "^11.0.15", "@nestjs/schedule": "^5.0.1", "@opentelemetry/api": "^1.9.0", - "@opentelemetry/auto-instrumentations-node": "^0.57.1", - "@opentelemetry/exporter-metrics-otlp-proto": "^0.200.0", - "@opentelemetry/exporter-trace-otlp-proto": "^0.200.0", - "@opentelemetry/resources": "^2.0.0", - "@opentelemetry/sdk-node": "^0.200.0", - "@opentelemetry/semantic-conventions": "^1.31.0", + "@opentelemetry/auto-instrumentations-node": "^0.60.0", + "@opentelemetry/exporter-trace-otlp-http": "^0.202.0", + "@opentelemetry/sdk-node": "^0.202.0", "@prisma/client": "^6.6.0", "date-fns": "^4.1.0", "date-fns-tz": "^3.2.0", diff --git a/service/data-hub/data-connector/prisma/seed/tariffs/btw-aok.ts b/service/data-hub/data-connector/prisma/seed/tariffs/btw-aok.ts index dbbe6d7..87983f6 100644 --- a/service/data-hub/data-connector/prisma/seed/tariffs/btw-aok.ts +++ b/service/data-hub/data-connector/prisma/seed/tariffs/btw-aok.ts @@ -19,7 +19,7 @@ export const BTW_AOK_TARIFFS = [ kmInclusive: 20, }, { - description: 'Nachtzuschlag', + description: 'Nachtzuschlag 19:00-07:00', variant: CostTypeVariant.NACHTZUSCHLAG, costAmount: 1665, timeRange: '19:00-07:00', @@ -53,7 +53,7 @@ export const BTW_AOK_TARIFFS = [ kmInclusive: 20, }, { - description: 'Nachtzuschlag', + description: 'Nachtzuschlag 19:00-07:00', variant: CostTypeVariant.NACHTZUSCHLAG, costAmount: 1665, timeRange: '19:00-07:00', @@ -87,7 +87,7 @@ export const BTW_AOK_TARIFFS = [ kmInclusive: 20, }, { - description: 'Nachtzuschlag', + description: 'Nachtzuschlag 18:00-07:30', variant: CostTypeVariant.NACHTZUSCHLAG, costAmount: 1765, timeRange: '18:00-07:30', @@ -107,7 +107,7 @@ export const BTW_AOK_TARIFFS = [ { description: 'AOK/BKK/IKK/Knappschaft BTW', validFrom: startOfDay(new Date('2023-05-01')), - validTo: null, + validTo: endOfDay(new Date('2024-06-30')), costTypes: [ { description: 'Grundpauschale je Fahrt', @@ -121,7 +121,7 @@ export const BTW_AOK_TARIFFS = [ kmInclusive: 20, }, { - description: 'Nachtzuschlag', + description: 'Nachtzuschlag 18:00-07:30', variant: CostTypeVariant.NACHTZUSCHLAG, costAmount: 1865, timeRange: '18:00-07:30', @@ -138,4 +138,145 @@ export const BTW_AOK_TARIFFS = [ }, ], }, + { + description: 'AOK/BKK/IKK/Knappschaft BTW', + validFrom: startOfDay(new Date('2024-07-01')), + validTo: endOfDay(new Date('2024-12-31')), + costTypes: [ + { + description: 'Grundpauschale je Fahrt', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 4000, + timeRange: '00:00-14:29', + }, + { + description: 'Grundpauschale je Fahrt', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 4000, + timeRange: '18:01-23:59', + }, + { + description: 'Grundpauschale je Fahrt (14:30-18:00)', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 4500, + timeRange: '14:30-18:00', + }, + { + description: 'ab dem 21. km', + variant: CostTypeVariant.KILOMETERZUSCHLAG, + costAmount: 200, + kmInclusive: 20, + }, + { + description: 'Nachtzuschlag 18:00-07:30', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 2500, + timeRange: '18:00-07:30', + }, + { + description: 'Wochenendzuschlag', + variant: CostTypeVariant.WOCHENENDZUSCHLAG, + costAmount: 2500, + }, + { + description: 'Feiertagszuschlag', + variant: CostTypeVariant.FEIERTAGSZUSCHLAG, + costAmount: 2500, + }, + ], + }, + { + description: 'AOK/BKK/IKK/Knappschaft BTW', + validFrom: startOfDay(new Date('2025-01-01')), + validTo: endOfDay(new Date('2025-12-31')), + costTypes: [ + { + description: 'Grundpauschale je Fahrt', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 4250, + timeRange: '00:00-14:29', + }, + { + description: 'Grundpauschale je Fahrt', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 4250, + timeRange: '18:01-23:59', + }, + { + description: 'Grundpauschale je Fahrt (14:30-18:00)', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 5000, + timeRange: '14:30-18:00', + }, + { + description: 'ab dem 21. km', + variant: CostTypeVariant.KILOMETERZUSCHLAG, + costAmount: 200, + kmInclusive: 20, + }, + { + description: 'Nachtzuschlag 18:00-07:30', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 3000, + timeRange: '18:00-07:30', + }, + { + description: 'Wochenendzuschlag', + variant: CostTypeVariant.WOCHENENDZUSCHLAG, + costAmount: 3000, + }, + { + description: 'Feiertagszuschlag', + variant: CostTypeVariant.FEIERTAGSZUSCHLAG, + costAmount: 3000, + }, + ], + }, + { + description: 'AOK/BKK/IKK/Knappschaft BTW', + validFrom: startOfDay(new Date('2026-01-01')), + validTo: null, + costTypes: [ + { + description: 'Grundpauschale je Fahrt', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 4500, + timeRange: '00:00-14:29', + }, + { + description: 'Grundpauschale je Fahrt', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 4500, + timeRange: '18:01-23:59', + }, + { + description: 'Grundpauschale je Fahrt (14:30-18:00)', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 5000, + timeRange: '14:30-18:00', + }, + { + description: 'ab dem 21. km', + variant: CostTypeVariant.KILOMETERZUSCHLAG, + costAmount: 200, + kmInclusive: 20, + }, + { + description: 'Nachtzuschlag 18:00-07:30', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 3000, + timeRange: '18:00-07:30', + }, + { + description: 'Wochenendzuschlag', + variant: CostTypeVariant.WOCHENENDZUSCHLAG, + costAmount: 3000, + }, + { + description: 'Feiertagszuschlag', + variant: CostTypeVariant.FEIERTAGSZUSCHLAG, + costAmount: 3000, + }, + ], + }, ]; diff --git a/service/data-hub/data-connector/prisma/seed/tariffs/btw-dak-vdek.ts b/service/data-hub/data-connector/prisma/seed/tariffs/btw-dak-vdek.ts index a9abd26..a7c8f24 100644 --- a/service/data-hub/data-connector/prisma/seed/tariffs/btw-dak-vdek.ts +++ b/service/data-hub/data-connector/prisma/seed/tariffs/btw-dak-vdek.ts @@ -23,7 +23,7 @@ export const BTW_DAK_VDEK_TARIFFS = [ { description: 'DAK + VDEK BTW', validFrom: startOfDay(new Date('2023-06-01')), - validTo: null, + validTo: endOfDay(new Date('2024-08-31')), costTypes: [ { description: 'Grundpauschale je Fahrt', @@ -38,4 +38,22 @@ export const BTW_DAK_VDEK_TARIFFS = [ }, ], }, + { + description: 'DAK + VDEK BTW', + validFrom: startOfDay(new Date('2024-09-01')), + validTo: null, + costTypes: [ + { + description: 'Grundpauschale je Fahrt', + variant: CostTypeVariant.GRUNDPREIS, + costAmount: 4400, + }, + { + description: 'ab dem 21. km', + variant: CostTypeVariant.KILOMETERZUSCHLAG, + costAmount: 180, + kmInclusive: 21, + }, + ], + }, ]; diff --git a/service/data-hub/data-connector/prisma/seed/tariffs/btw-privat.ts b/service/data-hub/data-connector/prisma/seed/tariffs/btw-privat.ts index 1747054..7e476c0 100644 --- a/service/data-hub/data-connector/prisma/seed/tariffs/btw-privat.ts +++ b/service/data-hub/data-connector/prisma/seed/tariffs/btw-privat.ts @@ -1,11 +1,11 @@ import { CostTypeVariant } from '@prisma/client'; -import { startOfDay } from 'date-fns'; +import { endOfDay, startOfDay } from 'date-fns'; export const BTW_PRIVAT_TARIFFS = [ { description: 'Privat BTW', validFrom: startOfDay(new Date('2020-01-01')), - validTo: null, + validTo: endOfDay(new Date('2023-12-31')), costTypes: [ { description: 'Grundpauschale je Fahrt', @@ -24,7 +24,46 @@ export const BTW_PRIVAT_TARIFFS = [ kmInclusive: 15, }, { - description: 'Nachtzuschlag', + description: 'Nachtzuschlag 19:00-07:00', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 4000, + timeRange: '19:00-07:00', + }, + { + description: 'Wochenendzuschlag', + variant: CostTypeVariant.WOCHENENDZUSCHLAG, + costAmount: 4000, + }, + { + description: 'Feiertagszuschlag', + variant: CostTypeVariant.FEIERTAGSZUSCHLAG, + costAmount: 4000, + }, + ], + }, + { + description: 'Privat BTW', + validFrom: startOfDay(new Date('2024-01-01')), + validTo: null, + costTypes: [ + { + description: 'Grundpauschale je Fahrt', + variant: CostTypeVariant.GRUNDPREIS, + costAmount: 8500, + }, + { + description: 'QMS Zuschlag', + variant: CostTypeVariant.GRUNDPREIS, + costAmount: 2000, + }, + { + description: 'ab dem 16. km', + variant: CostTypeVariant.KILOMETERZUSCHLAG, + costAmount: 250, + kmInclusive: 15, + }, + { + description: 'Nachtzuschlag 19:00-07:00', variant: CostTypeVariant.NACHTZUSCHLAG, costAmount: 4000, timeRange: '19:00-07:00', diff --git a/service/data-hub/data-connector/prisma/seed/tariffs/ktw-aok.ts b/service/data-hub/data-connector/prisma/seed/tariffs/ktw-aok.ts index eec4877..ae2158f 100644 --- a/service/data-hub/data-connector/prisma/seed/tariffs/ktw-aok.ts +++ b/service/data-hub/data-connector/prisma/seed/tariffs/ktw-aok.ts @@ -5,45 +5,6 @@ export const KTW_AOK_TARIFFS = [ { description: 'AOK/BKK/IKK/Knappschaft KTW', validFrom: startOfDay(new Date('2019-04-01')), - validTo: endOfDay(new Date('2021-04-22')), - costTypes: [ - { - description: 'Grundpauschale je Fahrt', - variant: CostTypeVariant.GRUNDPREIS, - costAmount: 8936, - }, - { - description: 'Desinfektionszuschlag', - variant: CostTypeVariant.GRUNDPREIS, - costAmount: 70, - }, - { - description: 'ab dem 18. km', - variant: CostTypeVariant.KILOMETERZUSCHLAG, - costAmount: 286, - kmInclusive: 18, - }, - { - description: 'Nachtzuschlag', - variant: CostTypeVariant.NACHTZUSCHLAG, - costAmount: 4003, - timeRange: '19:00-07:00', - }, - { - description: 'Wochenendzuschlag', - variant: CostTypeVariant.WOCHENENDZUSCHLAG, - costAmount: 4003, - }, - { - description: 'Feiertagszuschlag', - variant: CostTypeVariant.FEIERTAGSZUSCHLAG, - costAmount: 4003, - }, - ], - }, - { - description: 'AOK/BKK/IKK/Knappschaft KTW', - validFrom: startOfDay(new Date('2021-04-23')), validTo: endOfDay(new Date('2021-06-30')), costTypes: [ { @@ -51,18 +12,24 @@ export const KTW_AOK_TARIFFS = [ variant: CostTypeVariant.GRUNDPREIS, costAmount: 8936, }, - { - description: 'QMS Zuschlag', - variant: CostTypeVariant.GRUNDPREIS, - costAmount: 177, - }, { description: 'Desinfektionszuschlag', variant: CostTypeVariant.GRUNDPREIS, costAmount: 70, }, { - description: 'Nachtzuschlag', + description: 'QMS Zuschlag', + variant: CostTypeVariant.GRUNDPREIS, + costAmount: 177, + }, + { + description: 'ab dem 18. km', + variant: CostTypeVariant.KILOMETERZUSCHLAG, + costAmount: 286, + kmInclusive: 18, + }, + { + description: 'Nachtzuschlag 19:00-07:00', variant: CostTypeVariant.NACHTZUSCHLAG, costAmount: 4003, timeRange: '19:00-07:00', @@ -77,12 +44,6 @@ export const KTW_AOK_TARIFFS = [ variant: CostTypeVariant.FEIERTAGSZUSCHLAG, costAmount: 4003, }, - { - description: 'ab dem 18. km', - variant: CostTypeVariant.KILOMETERZUSCHLAG, - costAmount: 286, - kmInclusive: 18, - }, ], }, { @@ -106,7 +67,13 @@ export const KTW_AOK_TARIFFS = [ costAmount: 181, }, { - description: 'Nachtzuschlag', + description: 'ab dem 18. km', + variant: CostTypeVariant.KILOMETERZUSCHLAG, + costAmount: 293, + kmInclusive: 18, + }, + { + description: 'Nachtzuschlag 19:00-07:00', variant: CostTypeVariant.NACHTZUSCHLAG, costAmount: 4104, timeRange: '19:00-07:00', @@ -121,12 +88,6 @@ export const KTW_AOK_TARIFFS = [ variant: CostTypeVariant.FEIERTAGSZUSCHLAG, costAmount: 4104, }, - { - description: 'ab dem 18. km', - variant: CostTypeVariant.KILOMETERZUSCHLAG, - costAmount: 293, - kmInclusive: 18, - }, ], }, { @@ -174,7 +135,7 @@ export const KTW_AOK_TARIFFS = [ kmInclusive: 17, }, { - description: 'Nachtzuschlag', + description: 'Nachtzuschlag 18:30-06:30', variant: CostTypeVariant.NACHTZUSCHLAG, costAmount: 6500, timeRange: '18:30-06:30', @@ -218,7 +179,7 @@ export const KTW_AOK_TARIFFS = [ { description: 'AOK/BKK/IKK/Knappschaft KTW', validFrom: startOfDay(new Date('2024-01-01')), - validTo: null, + validTo: endOfDay(new Date('2024-12-31')), costTypes: [ { description: 'Grundpauschale je Fahrt', @@ -260,7 +221,7 @@ export const KTW_AOK_TARIFFS = [ kmInclusive: 17, }, { - description: 'Nachtzuschlag', + description: 'Nachtzuschlag 18:30-06:30', variant: CostTypeVariant.NACHTZUSCHLAG, costAmount: 6919, timeRange: '18:30-06:30', @@ -301,4 +262,128 @@ export const KTW_AOK_TARIFFS = [ }, ], }, + { + description: 'AOK/BKK/IKK/Knappschaft KTW', + validFrom: startOfDay(new Date('2025-01-01')), + validTo: endOfDay(new Date('2025-06-30')), + costTypes: [ + { + description: 'Grundpauschale je Fahrt', + variant: CostTypeVariant.GRUNDPREIS, + costAmount: 7500, + }, + { + description: 'QMS Zuschlag', + variant: CostTypeVariant.GRUNDPREIS, + costAmount: 3000, + }, + { + description: 'Modernes Einsatzfahrzeug', + variant: CostTypeVariant.FAHRZEUGZUSCHLAG, + costAmount: 1600, + // excludeCarNames: [ + // '1/KTW-01', + // '1/KTW-02', + // '1/KTW-03', + // '1/KTW-04', + // '1/KTW-05-E', + // '1/KTW-06', + // ], + }, + { + description: 'Leitstellenmanagement', + variant: CostTypeVariant.GRUNDPREIS, + costAmount: 900, + }, + { + description: 'Desinfektionszuschlag pauschal', + variant: CostTypeVariant.GRUNDPREIS, + costAmount: 2500, + }, + { + description: 'ab dem 18. km', + variant: CostTypeVariant.KILOMETERZUSCHLAG, + costAmount: 385, + kmInclusive: 18, + }, + { + description: 'Nachtzuschlag 18:30-06:30', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 8500, + timeRange: '18:30-06:30', + }, + { + description: 'Wochenendzuschlag', + variant: CostTypeVariant.WOCHENENDZUSCHLAG, + costAmount: 8500, + }, + { + description: 'Feiertagszuschlag', + variant: CostTypeVariant.FEIERTAGSZUSCHLAG, + costAmount: 8500, + }, + ], + }, + { + description: 'AOK/BKK/IKK/Knappschaft KTW', + validFrom: startOfDay(new Date('2025-07-01')), + validTo: null, + costTypes: [ + { + description: 'Grundpauschale je Fahrt', + variant: CostTypeVariant.GRUNDPREIS, + costAmount: 7831, + }, + { + description: 'QMS Zuschlag', + variant: CostTypeVariant.GRUNDPREIS, + costAmount: 3132, + }, + { + description: 'Modernes Einsatzfahrzeug', + variant: CostTypeVariant.FAHRZEUGZUSCHLAG, + costAmount: 1671, + // excludeCarNames: [ + // '1/KTW-01', + // '1/KTW-02', + // '1/KTW-03', + // '1/KTW-04', + // '1/KTW-05-E', + // '1/KTW-06', + // ], + }, + { + description: 'Leitstellenmanagement', + variant: CostTypeVariant.GRUNDPREIS, + costAmount: 940, + }, + { + description: 'Desinfektionszuschlag pauschal', + variant: CostTypeVariant.GRUNDPREIS, + costAmount: 2610, + }, + { + description: 'ab dem 19. km', + variant: CostTypeVariant.KILOMETERZUSCHLAG, + costAmount: 402, + kmInclusive: 18, + }, + { + description: 'Nachtzuschlag 19:00-07:00', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 8875, + timeRange: '19:00-07:00', + }, + { + description: 'Wochenendzuschlag', + variant: CostTypeVariant.WOCHENENDZUSCHLAG, + costAmount: 8875, + }, + { + description: 'Feiertagszuschlag', + variant: CostTypeVariant.FEIERTAGSZUSCHLAG, + costAmount: 8875, + }, + ], + }, ]; diff --git a/service/data-hub/data-connector/prisma/seed/tariffs/ktw-dak.ts b/service/data-hub/data-connector/prisma/seed/tariffs/ktw-dak.ts index d01ff2d..1e6779c 100644 --- a/service/data-hub/data-connector/prisma/seed/tariffs/ktw-dak.ts +++ b/service/data-hub/data-connector/prisma/seed/tariffs/ktw-dak.ts @@ -5,40 +5,6 @@ export const KTW_DAK_TARIFFS = [ { description: 'DAK KTW', validFrom: startOfDay(new Date('2018-02-01')), - validTo: endOfDay(new Date('2021-04-22')), - costTypes: [ - { - description: 'Grundpauschale je Fahrt', - variant: CostTypeVariant.GRUNDPREIS, - costAmount: 8507, - }, - { - description: 'ab dem 18. km', - variant: CostTypeVariant.KILOMETERZUSCHLAG, - costAmount: 284, - kmInclusive: 17, - }, - { - description: 'Nachtzuschlag', - variant: CostTypeVariant.NACHTZUSCHLAG, - costAmount: 4728, - timeRange: '18:30-06:30', - }, - { - description: 'Wochenendzuschlag', - variant: CostTypeVariant.WOCHENENDZUSCHLAG, - costAmount: 4728, - }, - { - description: 'Feiertagszuschlag', - variant: CostTypeVariant.FEIERTAGSZUSCHLAG, - costAmount: 4728, - }, - ], - }, - { - description: 'DAK KTW', - validFrom: startOfDay(new Date('2021-04-23')), validTo: endOfDay(new Date('2021-09-30')), costTypes: [ { @@ -58,7 +24,7 @@ export const KTW_DAK_TARIFFS = [ kmInclusive: 17, }, { - description: 'Nachtzuschlag', + description: 'Nachtzuschlag 18:30-06:30', variant: CostTypeVariant.NACHTZUSCHLAG, costAmount: 4728, timeRange: '18:30-06:30', @@ -102,7 +68,7 @@ export const KTW_DAK_TARIFFS = [ kmInclusive: 16, }, { - description: 'Nachtzuschlag', + description: 'Nachtzuschlag 18:30-06:30', variant: CostTypeVariant.NACHTZUSCHLAG, costAmount: 5300, timeRange: '18:30-06:30', @@ -170,7 +136,7 @@ export const KTW_DAK_TARIFFS = [ kmInclusive: 16, }, { - description: 'Nachtzuschlag', + description: 'Nachtzuschlag 18:30-06:30', variant: CostTypeVariant.NACHTZUSCHLAG, costAmount: 5485, timeRange: '18:30-06:30', @@ -214,7 +180,7 @@ export const KTW_DAK_TARIFFS = [ { description: 'DAK KTW', validFrom: startOfDay(new Date('2024-01-01')), - validTo: null, + validTo: endOfDay(new Date('2024-12-31')), costTypes: [ { description: 'Grundpauschale je Fahrt', @@ -238,25 +204,25 @@ export const KTW_DAK_TARIFFS = [ kmInclusive: 16, }, { - description: 'Nachtzuschlag', + description: 'Nachtzuschlag 19:00-19:59', variant: CostTypeVariant.NACHTZUSCHLAG, costAmount: 5728, timeRange: '19:00-19:59', }, { - description: 'Nachtzuschlag', + description: 'Nachtzuschlag 20:00-21:59', variant: CostTypeVariant.NACHTZUSCHLAG, costAmount: 6644, timeRange: '20:00-21:59', }, { - description: 'Nachtzuschlag', + description: 'Nachtzuschlag 22:00-04:59', variant: CostTypeVariant.NACHTZUSCHLAG, costAmount: 7198, timeRange: '22:00-04:59', }, { - description: 'Nachtzuschlag', + description: 'Nachtzuschlag 05:00-06:00', variant: CostTypeVariant.NACHTZUSCHLAG, costAmount: 5728, timeRange: '05:00-06:00', @@ -297,4 +263,262 @@ export const KTW_DAK_TARIFFS = [ }, ], }, + { + description: 'DAK KTW', + validFrom: startOfDay(new Date('2025-01-01')), + validTo: endOfDay(new Date('2025-04-30')), + costTypes: [ + { + description: 'Grundpauschale je Fahrt', + variant: CostTypeVariant.GRUNDPREIS, + costAmount: 9648, + }, + { + description: 'QMS Zuschlag', + variant: CostTypeVariant.GRUNDPREIS, + costAmount: 2144, + }, + { + description: 'Modernes Einsatzfahrzeug', + variant: CostTypeVariant.GRUNDPREIS, + costAmount: 1072, + }, + { + description: 'ab dem 17. km', + variant: CostTypeVariant.KILOMETERZUSCHLAG, + costAmount: 354, + kmInclusive: 16, + }, + { + description: 'Nachtzuschlag 19:00-19:59', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 6140, + timeRange: '19:00-19:59', + }, + { + description: 'Nachtzuschlag 20:00-21:59', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 7122, + timeRange: '20:00-21:59', + }, + { + description: 'Nachtzuschlag 22:00-04:59', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 7716, + timeRange: '22:00-04:59', + }, + { + description: 'Nachtzuschlag 05:00-06:00', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 6140, + timeRange: '05:00-06:00', + }, + { + description: 'Wochenendzuschlag', + variant: CostTypeVariant.WOCHENENDZUSCHLAG, + costAmount: 5800, + }, + { + description: 'Feiertagszuschlag', + variant: CostTypeVariant.FEIERTAGSZUSCHLAG, + costAmount: 5800, + }, + { + description: 'Desinfektionszuschlag 2.A', + variant: CostTypeVariant.DESINFEKTIONSZUSCHLAG, + costAmount: 3981, + infectionType: '2.A', + }, + { + description: 'Desinfektionszuschlag 2.B', + variant: CostTypeVariant.DESINFEKTIONSZUSCHLAG, + costAmount: 15914, + infectionType: '2.B', + }, + { + description: 'Desinfektionszuschlag 3.1', + variant: CostTypeVariant.DESINFEKTIONSZUSCHLAG, + costAmount: 18298, + infectionType: '3.1', + }, + { + description: 'Desinfektionszuschlag 3.2', + variant: CostTypeVariant.DESINFEKTIONSZUSCHLAG, + costAmount: 18298, + infectionType: '3.2', + }, + ], + }, + { + description: 'DAK KTW', + validFrom: startOfDay(new Date('2025-05-01')), + validTo: endOfDay(new Date('2025-12-31')), + costTypes: [ + { + description: 'Grundpauschale je Fahrt', + variant: CostTypeVariant.GRUNDPREIS, + costAmount: 10073, + }, + { + description: 'QMS Zuschlag', + variant: CostTypeVariant.GRUNDPREIS, + costAmount: 2239, + }, + { + description: 'Modernes Einsatzfahrzeug', + variant: CostTypeVariant.GRUNDPREIS, + costAmount: 1119, + }, + { + description: 'ab dem 17. km', + variant: CostTypeVariant.KILOMETERZUSCHLAG, + costAmount: 369, + kmInclusive: 16, + }, + { + description: 'Nachtzuschlag 19:00-19:59', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 6411, + timeRange: '19:00-19:59', + }, + { + description: 'Nachtzuschlag 20:00-21:59', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 7436, + timeRange: '20:00-21:59', + }, + { + description: 'Nachtzuschlag 22:00-04:59', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 8057, + timeRange: '22:00-04:59', + }, + { + description: 'Nachtzuschlag 05:00-06:00', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 6411, + timeRange: '05:00-06:00', + }, + { + description: 'Wochenendzuschlag', + variant: CostTypeVariant.WOCHENENDZUSCHLAG, + costAmount: 6055, + }, + { + description: 'Feiertagszuschlag', + variant: CostTypeVariant.FEIERTAGSZUSCHLAG, + costAmount: 6055, + }, + { + description: 'Desinfektionszuschlag 2.A', + variant: CostTypeVariant.DESINFEKTIONSZUSCHLAG, + costAmount: 4157, + infectionType: '2.A', + }, + { + description: 'Desinfektionszuschlag 2.B', + variant: CostTypeVariant.DESINFEKTIONSZUSCHLAG, + costAmount: 16616, + infectionType: '2.B', + }, + { + description: 'Desinfektionszuschlag 3.1', + variant: CostTypeVariant.DESINFEKTIONSZUSCHLAG, + costAmount: 19105, + infectionType: '3.1', + }, + { + description: 'Desinfektionszuschlag 3.2', + variant: CostTypeVariant.DESINFEKTIONSZUSCHLAG, + costAmount: 19105, + infectionType: '3.2', + }, + ], + }, + { + description: 'DAK KTW', + validFrom: startOfDay(new Date('2026-01-01')), + validTo: null, + costTypes: [ + { + description: 'Grundpauschale je Fahrt', + variant: CostTypeVariant.GRUNDPREIS, + costAmount: 10142, + }, + { + description: 'QMS Zuschlag', + variant: CostTypeVariant.GRUNDPREIS, + costAmount: 2239, + }, + { + description: 'Modernes Einsatzfahrzeug', + variant: CostTypeVariant.GRUNDPREIS, + costAmount: 1119, + }, + { + description: 'ab dem 17. km', + variant: CostTypeVariant.KILOMETERZUSCHLAG, + costAmount: 369, + kmInclusive: 16, + }, + { + description: 'Nachtzuschlag 19:00-19:59', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 6411, + timeRange: '19:00-19:59', + }, + { + description: 'Nachtzuschlag 20:00-21:59', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 7436, + timeRange: '20:00-21:59', + }, + { + description: 'Nachtzuschlag 22:00-04:59', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 8057, + timeRange: '22:00-04:59', + }, + { + description: 'Nachtzuschlag 05:00-06:00', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 6411, + timeRange: '05:00-06:00', + }, + { + description: 'Wochenendzuschlag', + variant: CostTypeVariant.WOCHENENDZUSCHLAG, + costAmount: 6055, + }, + { + description: 'Feiertagszuschlag', + variant: CostTypeVariant.FEIERTAGSZUSCHLAG, + costAmount: 6055, + }, + { + description: 'Desinfektionszuschlag 2.A', + variant: CostTypeVariant.DESINFEKTIONSZUSCHLAG, + costAmount: 4157, + infectionType: '2.A', + }, + { + description: 'Desinfektionszuschlag 2.B', + variant: CostTypeVariant.DESINFEKTIONSZUSCHLAG, + costAmount: 16616, + infectionType: '2.B', + }, + { + description: 'Desinfektionszuschlag 3.1', + variant: CostTypeVariant.DESINFEKTIONSZUSCHLAG, + costAmount: 19105, + infectionType: '3.1', + }, + { + description: 'Desinfektionszuschlag 3.2', + variant: CostTypeVariant.DESINFEKTIONSZUSCHLAG, + costAmount: 19105, + infectionType: '3.2', + }, + ], + }, ]; diff --git a/service/data-hub/data-connector/prisma/seed/tariffs/ktw-privat.ts b/service/data-hub/data-connector/prisma/seed/tariffs/ktw-privat.ts index fc76274..89a6796 100644 --- a/service/data-hub/data-connector/prisma/seed/tariffs/ktw-privat.ts +++ b/service/data-hub/data-connector/prisma/seed/tariffs/ktw-privat.ts @@ -1,11 +1,11 @@ import { CostTypeVariant } from '@prisma/client'; -import { startOfDay } from 'date-fns'; +import { endOfDay, startOfDay } from 'date-fns'; export const KTW_PRIVAT_TARIFFS = [ { description: 'Privat KTW', validFrom: startOfDay(new Date('2020-01-01')), - validTo: null, + validTo: endOfDay(new Date('2023-12-31')), costTypes: [ { description: 'Grundpauschale je Fahrt', @@ -65,4 +65,72 @@ export const KTW_PRIVAT_TARIFFS = [ }, ], }, + { + description: 'Privat KTW', + validFrom: startOfDay(new Date('2024-01-01')), + validTo: null, + costTypes: [ + { + description: 'Grundpauschale je Fahrt', + variant: CostTypeVariant.GRUNDPREIS, + costAmount: 19000, + }, + { + description: 'QMS Zuschlag', + variant: CostTypeVariant.GRUNDPREIS, + costAmount: 3300, + }, + { + description: 'Hygienemaßnahmen', + variant: CostTypeVariant.GRUNDPREIS, + costAmount: 1500, + }, + { + description: 'ab dem 16. km', + variant: CostTypeVariant.KILOMETERZUSCHLAG, + costAmount: 390, + kmInclusive: 15, + }, + { + description: 'Nachtzuschlag 18:30-07:00', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 8800, + timeRange: '18:30-07:00', + }, + { + description: 'Wochenendzuschlag', + variant: CostTypeVariant.WOCHENENDZUSCHLAG, + costAmount: 8800, + }, + { + description: 'Feiertagszuschlag', + variant: CostTypeVariant.FEIERTAGSZUSCHLAG, + costAmount: 8800, + }, + { + description: 'Desinfektionszuschlag 2.A', + variant: CostTypeVariant.DESINFEKTIONSZUSCHLAG, + costAmount: 8800, + infectionType: '2.A', + }, + { + description: 'Desinfektionszuschlag 2.B', + variant: CostTypeVariant.DESINFEKTIONSZUSCHLAG, + costAmount: 17500, + infectionType: '2.B', + }, + { + description: 'Desinfektionszuschlag 3.1', + variant: CostTypeVariant.DESINFEKTIONSZUSCHLAG, + costAmount: 17500, + infectionType: '3.1', + }, + { + description: 'Desinfektionszuschlag 3.2', + variant: CostTypeVariant.DESINFEKTIONSZUSCHLAG, + costAmount: 17500, + infectionType: '3.2', + }, + ], + }, ]; diff --git a/service/data-hub/data-connector/prisma/seed/tariffs/ktw-vdek.ts b/service/data-hub/data-connector/prisma/seed/tariffs/ktw-vdek.ts index c8eaaab..28c6e5a 100644 --- a/service/data-hub/data-connector/prisma/seed/tariffs/ktw-vdek.ts +++ b/service/data-hub/data-connector/prisma/seed/tariffs/ktw-vdek.ts @@ -5,40 +5,6 @@ export const KTW_VDEK_TARIFFS = [ { description: 'VDEK KTW', validFrom: startOfDay(new Date('2017-09-01')), - validTo: endOfDay(new Date('2021-04-22')), - costTypes: [ - { - description: 'Grundpauschale je Fahrt', - variant: CostTypeVariant.GRUNDPREIS, - costAmount: 8150, - }, - { - description: 'ab dem 18. km', - variant: CostTypeVariant.KILOMETERZUSCHLAG, - costAmount: 273, - kmInclusive: 17, - }, - { - description: 'Nachtzuschlag', - variant: CostTypeVariant.NACHTZUSCHLAG, - costAmount: 4550, - timeRange: '18:30-06:30', - }, - { - description: 'Wochenendzuschlag', - variant: CostTypeVariant.WOCHENENDZUSCHLAG, - costAmount: 4550, - }, - { - description: 'Feiertagszuschlag', - variant: CostTypeVariant.FEIERTAGSZUSCHLAG, - costAmount: 4550, - }, - ], - }, - { - description: 'VDEK KTW', - validFrom: startOfDay(new Date('2021-04-23')), validTo: endOfDay(new Date('2021-06-30')), costTypes: [ { @@ -58,7 +24,7 @@ export const KTW_VDEK_TARIFFS = [ kmInclusive: 17, }, { - description: 'Nachtzuschlag', + description: 'Nachtzuschlag 18:30-06:30', variant: CostTypeVariant.NACHTZUSCHLAG, costAmount: 4550, timeRange: '18:30-06:30', @@ -97,7 +63,7 @@ export const KTW_VDEK_TARIFFS = [ kmInclusive: 17, }, { - description: 'Nachtzuschlag', + description: 'Nachtzuschlag 18:30-06:30', variant: CostTypeVariant.NACHTZUSCHLAG, costAmount: 5028, timeRange: '18:30-06:30', @@ -146,7 +112,7 @@ export const KTW_VDEK_TARIFFS = [ kmInclusive: 16, }, { - description: 'Nachtzuschlag', + description: 'Nachtzuschlag 18:30-06:30', variant: CostTypeVariant.NACHTZUSCHLAG, costAmount: 5537, timeRange: '18:30-06:30', @@ -190,7 +156,7 @@ export const KTW_VDEK_TARIFFS = [ { description: 'VDEK KTW', validFrom: startOfDay(new Date('2023-05-01')), - validTo: endOfDay(new Date('2024-04-31')), + validTo: endOfDay(new Date('2024-04-30')), costTypes: [ { description: 'Grundpauschale je Fahrt', @@ -219,25 +185,25 @@ export const KTW_VDEK_TARIFFS = [ kmInclusive: 16, }, { - description: 'Nachtzuschlag', + description: 'Nachtzuschlag 19:00-19:59', variant: CostTypeVariant.NACHTZUSCHLAG, costAmount: 5728, timeRange: '19:00-19:59', }, { - description: 'Nachtzuschlag', + description: 'Nachtzuschlag 20:00-21:59', variant: CostTypeVariant.NACHTZUSCHLAG, costAmount: 6644, timeRange: '20:00-21:59', }, { - description: 'Nachtzuschlag', + description: 'Nachtzuschlag 22:00-04:59', variant: CostTypeVariant.NACHTZUSCHLAG, costAmount: 7198, timeRange: '22:00-04:59', }, { - description: 'Nachtzuschlag', + description: 'Nachtzuschlag 05:00-06:00', variant: CostTypeVariant.NACHTZUSCHLAG, costAmount: 5728, timeRange: '05:00-06:00', @@ -281,7 +247,7 @@ export const KTW_VDEK_TARIFFS = [ { description: 'VDEK KTW', validFrom: startOfDay(new Date('2024-05-01')), - validTo: null, + validTo: endOfDay(new Date('2025-04-30')), costTypes: [ { description: 'Grundpauschale je Fahrt', @@ -310,25 +276,25 @@ export const KTW_VDEK_TARIFFS = [ kmInclusive: 16, }, { - description: 'Nachtzuschlag', + description: 'Nachtzuschlag 19:00-19:59', variant: CostTypeVariant.NACHTZUSCHLAG, costAmount: 5970, timeRange: '19:00-19:59', }, { - description: 'Nachtzuschlag', + description: 'Nachtzuschlag 20:00-21:59', variant: CostTypeVariant.NACHTZUSCHLAG, costAmount: 6924, timeRange: '20:00-21:59', }, { - description: 'Nachtzuschlag', + description: 'Nachtzuschlag 22:00-04:59', variant: CostTypeVariant.NACHTZUSCHLAG, costAmount: 7502, timeRange: '22:00-04:59', }, { - description: 'Nachtzuschlag', + description: 'Nachtzuschlag 05:00-06:00', variant: CostTypeVariant.NACHTZUSCHLAG, costAmount: 5970, timeRange: '05:00-06:00', @@ -369,4 +335,95 @@ export const KTW_VDEK_TARIFFS = [ }, ], }, + { + description: 'VDEK KTW', + validFrom: startOfDay(new Date('2025-05-01')), + validTo: null, + costTypes: [ + { + description: 'Grundpauschale je Fahrt', + variant: CostTypeVariant.GRUNDPREIS, + costAmount: 7971, + }, + { + description: 'QMS Zuschlag', + variant: CostTypeVariant.GRUNDPREIS, + costAmount: 3141, + }, + { + description: 'Modernes Einsatzfahrzeug', + variant: CostTypeVariant.GRUNDPREIS, + costAmount: 1885, + }, + { + description: 'Leitstellenmanagement', + variant: CostTypeVariant.GRUNDPREIS, + costAmount: 730, + }, + { + description: 'ab dem 17. km', + variant: CostTypeVariant.KILOMETERZUSCHLAG, + costAmount: 402, + kmInclusive: 16, + }, + { + description: 'Nachtzuschlag 19:00-19:59', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 6233, + timeRange: '19:00-19:59', + }, + { + description: 'Nachtzuschlag 20:00-21:59', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 7229, + timeRange: '20:00-21:59', + }, + { + description: 'Nachtzuschlag 22:00-04:59', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 7833, + timeRange: '22:00-04:59', + }, + { + description: 'Nachtzuschlag 05:00-06:00', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 6233, + timeRange: '05:00-06:00', + }, + { + description: 'Wochenendzuschlag', + variant: CostTypeVariant.WOCHENENDZUSCHLAG, + costAmount: 6992, + }, + { + description: 'Feiertagszuschlag', + variant: CostTypeVariant.FEIERTAGSZUSCHLAG, + costAmount: 6992, + }, + { + description: 'Desinfektionszuschlag 2.A', + variant: CostTypeVariant.DESINFEKTIONSZUSCHLAG, + costAmount: 4654, + infectionType: '2.A', + }, + { + description: 'Desinfektionszuschlag 2.B', + variant: CostTypeVariant.DESINFEKTIONSZUSCHLAG, + costAmount: 19070, + infectionType: '2.B', + }, + { + description: 'Desinfektionszuschlag 3.1', + variant: CostTypeVariant.DESINFEKTIONSZUSCHLAG, + costAmount: 22052, + infectionType: '3.1', + }, + { + description: 'Desinfektionszuschlag 3.2', + variant: CostTypeVariant.DESINFEKTIONSZUSCHLAG, + costAmount: 22052, + infectionType: '3.2', + }, + ], + }, ]; diff --git a/service/data-hub/data-connector/prisma/seed/tariffs/tsw-aok.ts b/service/data-hub/data-connector/prisma/seed/tariffs/tsw-aok.ts index 970bd23..ac6f398 100644 --- a/service/data-hub/data-connector/prisma/seed/tariffs/tsw-aok.ts +++ b/service/data-hub/data-connector/prisma/seed/tariffs/tsw-aok.ts @@ -19,7 +19,7 @@ export const TSW_AOK_TARIFFS = [ kmInclusive: 20, }, { - description: 'Nachtzuschlag', + description: 'Nachtzuschlag 19:00-07:00', variant: CostTypeVariant.NACHTZUSCHLAG, costAmount: 2445, timeRange: '19:00-07:00', @@ -53,7 +53,7 @@ export const TSW_AOK_TARIFFS = [ kmInclusive: 20, }, { - description: 'Nachtzuschlag', + description: 'Nachtzuschlag s19:00-07:00', variant: CostTypeVariant.NACHTZUSCHLAG, costAmount: 2445, timeRange: '19:00-07:00', @@ -87,7 +87,7 @@ export const TSW_AOK_TARIFFS = [ kmInclusive: 20, }, { - description: 'Nachtzuschlag', + description: 'Nachtzuschlag 18:00-07:30', variant: CostTypeVariant.NACHTZUSCHLAG, costAmount: 2600, timeRange: '18:00-07:30', @@ -107,7 +107,7 @@ export const TSW_AOK_TARIFFS = [ { description: 'AOK/BKK/IKK/Knappschaft TSW', validFrom: startOfDay(new Date('2023-05-01')), - validTo: null, + validTo: endOfDay(new Date('2024-06-30')), costTypes: [ { description: 'Grundpauschale je Fahrt', @@ -121,7 +121,7 @@ export const TSW_AOK_TARIFFS = [ kmInclusive: 20, }, { - description: 'Nachtzuschlag', + description: 'Nachtzuschlag 18:00-07:30', variant: CostTypeVariant.NACHTZUSCHLAG, costAmount: 2700, timeRange: '18:00-07:30', @@ -138,4 +138,138 @@ export const TSW_AOK_TARIFFS = [ }, ], }, + { + description: 'AOK/BKK/IKK/Knappschaft TSW', + validFrom: startOfDay(new Date('2024-07-01')), + validTo: endOfDay(new Date('2024-12-31')), + costTypes: [ + { + description: 'Grundpauschale je Fahrt', + variant: CostTypeVariant.GRUNDPREIS, + costAmount: 6000, + }, + { + description: 'ab dem 21. km', + variant: CostTypeVariant.KILOMETERZUSCHLAG, + costAmount: 200, + kmInclusive: 20, + }, + { + description: 'Nachmittagszuschlag 14:30-18:00', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 7000, + timeRange: '14:30-18:00', + }, + { + description: 'Nachtzuschlag 18:00-07:30', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 5000, + timeRange: '18:00-07:30', + }, + { + description: 'Wochenendzuschlag', + variant: CostTypeVariant.WOCHENENDZUSCHLAG, + costAmount: 5000, + }, + { + description: 'Feiertagszuschlag', + variant: CostTypeVariant.FEIERTAGSZUSCHLAG, + costAmount: 5000, + }, + ], + }, + { + description: 'AOK/BKK/IKK/Knappschaft TSW', + validFrom: startOfDay(new Date('2025-01-01')), + validTo: endOfDay(new Date('2025-12-31')), + costTypes: [ + { + description: 'Grundpauschale je Fahrt', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 6250, + timeRange: '00:00-14:29', + }, + { + description: 'Grundpauschale je Fahrt', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 6250, + timeRange: '18:01-23:59', + }, + { + description: 'Nachmittagspauschale 14:30-18:00', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 7500, + timeRange: '14:30-18:00', + }, + { + description: 'ab dem 21. km', + variant: CostTypeVariant.KILOMETERZUSCHLAG, + costAmount: 200, + kmInclusive: 20, + }, + { + description: 'Nachtzuschlag 18:00-07:30', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 6000, + timeRange: '18:00-07:30', + }, + { + description: 'Wochenendzuschlag', + variant: CostTypeVariant.WOCHENENDZUSCHLAG, + costAmount: 6000, + }, + { + description: 'Feiertagszuschlag', + variant: CostTypeVariant.FEIERTAGSZUSCHLAG, + costAmount: 6000, + }, + ], + }, + { + description: 'AOK/BKK/IKK/Knappschaft TSW', + validFrom: startOfDay(new Date('2026-01-01')), + validTo: null, + costTypes: [ + { + description: 'Grundpauschale je Fahrt', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 6500, + timeRange: '00:00-14:29', + }, + { + description: 'Grundpauschale je Fahrt', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 6500, + timeRange: '18:01-23:59', + }, + { + description: 'ab dem 21. km', + variant: CostTypeVariant.KILOMETERZUSCHLAG, + costAmount: 200, + kmInclusive: 20, + }, + { + description: 'Nachmittagszuschlag 14:30-18:00', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 7500, + timeRange: '14:30-18:00', + }, + { + description: 'Nachtzuschlag 18:00-07:30', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 6000, + timeRange: '18:00-07:30', + }, + { + description: 'Wochenendzuschlag', + variant: CostTypeVariant.WOCHENENDZUSCHLAG, + costAmount: 6000, + }, + { + description: 'Feiertagszuschlag', + variant: CostTypeVariant.FEIERTAGSZUSCHLAG, + costAmount: 6000, + }, + ], + }, ]; diff --git a/service/data-hub/data-connector/prisma/seed/tariffs/tsw-dak-vdek.ts b/service/data-hub/data-connector/prisma/seed/tariffs/tsw-dak-vdek.ts index a567335..8888c95 100644 --- a/service/data-hub/data-connector/prisma/seed/tariffs/tsw-dak-vdek.ts +++ b/service/data-hub/data-connector/prisma/seed/tariffs/tsw-dak-vdek.ts @@ -26,33 +26,33 @@ export const TSW_DAK_VDEK_TARIFFS = [ validTo: endOfDay(new Date('2024-08-31')), costTypes: [ { - description: 'Grundpauschale je Fahrt (TSW 2)', - variant: CostTypeVariant.TSWDIFFERENZIERUNG, + description: 'Grundpauschale je Fahrt', + variant: CostTypeVariant.GRUNDPREIS, costAmount: 5880, }, - { - description: 'Grundpauschale je Fahrt (TSW 1)', - variant: CostTypeVariant.TSWDIFFERENZIERUNG, - costAmount: 4380, - }, - { - description: 'Nachtzuschlag', - variant: CostTypeVariant.NACHTZUSCHLAG, - costAmount: 407, - timeRange: '18:30-20:00', - }, - { - description: 'Nachtzuschlag', - variant: CostTypeVariant.NACHTZUSCHLAG, - costAmount: 407, - timeRange: '06:00-07:00', - }, + // { + // description: 'Grundpauschale je Fahrt (TSW 1)', + // variant: CostTypeVariant.TSWDIFFERENZIERUNG, + // costAmount: 4380, + // }, { description: 'ab dem 22. km', variant: CostTypeVariant.KILOMETERZUSCHLAG, costAmount: 159, kmInclusive: 21, }, + { + description: 'Morgenzuschlag 06:00-07:00', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 407, + timeRange: '06:00-07:00', + }, + { + description: 'Abendzuschlag 18:30-20:00', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 407, + timeRange: '18:30-20:00', + }, ], }, { @@ -76,21 +76,26 @@ export const TSW_DAK_VDEK_TARIFFS = [ costAmount: 5793, }, { - description: 'Nachtzuschlag', + description: 'Fallmanagementzuschlag', + variant: CostTypeVariant.GRUNDPREIS, + costAmount: 750, + }, + { + description: 'Morgenzuschlag 05:00-07:00', variant: CostTypeVariant.NACHTZUSCHLAG, - costAmount: 407, + costAmount: 450, timeRange: '05:00-07:00', }, { - description: 'Fallmanagementzuschlag', + description: 'Abendzuschlag 19:00-23:00', variant: CostTypeVariant.NACHTZUSCHLAG, - costAmount: 750, - timeRange: '14:30-23:00', + costAmount: 407, + timeRange: '19:00-23:00', }, { description: 'ab dem 22. km', variant: CostTypeVariant.KILOMETERZUSCHLAG, - costAmount: 180, + costAmount: 159, kmInclusive: 21, }, ], diff --git a/service/data-hub/data-connector/prisma/seed/tariffs/tsw-privat.ts b/service/data-hub/data-connector/prisma/seed/tariffs/tsw-privat.ts index 3006668..c34c1ef 100644 --- a/service/data-hub/data-connector/prisma/seed/tariffs/tsw-privat.ts +++ b/service/data-hub/data-connector/prisma/seed/tariffs/tsw-privat.ts @@ -1,11 +1,11 @@ import { CostTypeVariant } from '@prisma/client'; -import { startOfDay } from 'date-fns'; +import { endOfDay, startOfDay } from 'date-fns'; export const TSW_PRIVAT_TARIFFS = [ { description: 'Privat TSW', validFrom: startOfDay(new Date('2020-01-01')), - validTo: null, + validTo: endOfDay(new Date('2023-12-31')), costTypes: [ { description: 'Grundpauschale je Fahrt', @@ -41,4 +41,43 @@ export const TSW_PRIVAT_TARIFFS = [ }, ], }, + { + description: 'Privat TSW', + validFrom: startOfDay(new Date('2024-01-01')), + validTo: null, + costTypes: [ + { + description: 'Grundpauschale je Fahrt', + variant: CostTypeVariant.GRUNDPREIS, + costAmount: 13500, + }, + { + description: 'QMS Zuschlag', + variant: CostTypeVariant.GRUNDPREIS, + costAmount: 2000, + }, + { + description: 'ab dem 16. km', + variant: CostTypeVariant.KILOMETERZUSCHLAG, + costAmount: 250, + kmInclusive: 15, + }, + { + description: 'Nachtzuschlag', + variant: CostTypeVariant.NACHTZUSCHLAG, + costAmount: 5500, + timeRange: '19:00-07:00', + }, + { + description: 'Wochenendzuschlag', + variant: CostTypeVariant.WOCHENENDZUSCHLAG, + costAmount: 5500, + }, + { + description: 'Feiertagszuschlag', + variant: CostTypeVariant.FEIERTAGSZUSCHLAG, + costAmount: 5500, + }, + ], + }, ]; diff --git a/service/data-hub/data-connector/src/app.module.ts b/service/data-hub/data-connector/src/app.module.ts index 04e3e00..a40389a 100644 --- a/service/data-hub/data-connector/src/app.module.ts +++ b/service/data-hub/data-connector/src/app.module.ts @@ -13,18 +13,18 @@ import { DatabaseModule } from './core/database/database.module'; import { PrismaModule } from './core/database/prisma.module'; import { ApplicationAccountingModule } from './modules/app-accounting/app-accounting.module'; import { ApplicationControlCenterModule } from './modules/app-control-center/app-control-center.module'; -import { ApplicationManagerModule } from './modules/app-manager/app-manager.module'; +import { ManagerModule } from './modules/app-manager/app-manager.module'; import { ApplicationTicketSystemModule } from './modules/app-ticket-system/app-ticket-system.module'; import { AnomalyDetectionModule } from './modules/feat-anomalies/anomaly-detection.module'; import { FeatureEtlModule } from './modules/feat-etl/feat-etl.module'; import { FeatReportsModule } from './modules/feat-reports/feat-reports.module'; import { TicketSystemModule } from './modules/feat-tickets/ticket-system.module'; -import { FeatureCalculationModule } from './modules/feat-calculation/feat-calculation.module'; +import { FeatCalculationModule } from './modules/feat-calculation/feat-calculation.module'; +import { AppHomeModule } from './modules/app-home/app-home.module'; @Module({ imports: [ ConfigModule, - // DatabaseModule.forRootAsync({ // isGlobal: true, // inject: [ConfigService], @@ -81,13 +81,14 @@ import { FeatureCalculationModule } from './modules/feat-calculation/feat-calcul }), FeatureEtlModule, FeatReportsModule, - FeatureCalculationModule, + FeatCalculationModule, TicketSystemModule, AnomalyDetectionModule, - ApplicationManagerModule, + ManagerModule, ApplicationAccountingModule, ApplicationControlCenterModule, ApplicationTicketSystemModule, + AppHomeModule, ], controllers: [AppController], providers: [AppService], diff --git a/service/data-hub/data-connector/src/app.service.ts b/service/data-hub/data-connector/src/app.service.ts index c22edff..5f24079 100644 --- a/service/data-hub/data-connector/src/app.service.ts +++ b/service/data-hub/data-connector/src/app.service.ts @@ -1,5 +1,5 @@ import { Injectable, Logger } from '@nestjs/common'; -import { SchedulerRegistry } from '@nestjs/schedule'; +import { Cron, SchedulerRegistry } from '@nestjs/schedule'; import { Interval as TimeInterval, addDays, @@ -13,12 +13,20 @@ import { concatMap, from, lastValueFrom, switchMap, take, tap } from 'rxjs'; import { ImporterService } from './modules/feat-etl/feat-importers/importer.service'; import { TicketService } from './modules/feat-tickets/tickets.service'; import { chunk } from './utils'; +import { AnomaliesService } from './modules/feat-anomalies/anomalies.service'; @Injectable() export class AppService { private readonly logger = new Logger(AppService.name); - // @Cron('0 */5 2-20 * * *') + constructor( + private readonly importer: ImporterService, + private readonly ticketService: TicketService, + private readonly anomalieService: AnomaliesService, + private readonly schedulerRegistry: SchedulerRegistry, + ) {} + + @Cron('0 */5 2-20 * * *') async fetchDataContinously() { const now = new Date(); const fetchInterval = { @@ -35,6 +43,13 @@ export class AppService { ), ), switchMap(() => from(this.ticketService.createTickets(fetchInterval))), + switchMap(() => + from( + this.anomalieService + .detectAnomalies(fetchInterval) + .then(() => this.anomalieService.validateAnomalies()), + ), + ), ) .subscribe(); } @@ -142,12 +157,6 @@ export class AppService { .subscribe(); } - constructor( - private readonly importer: ImporterService, - private readonly ticketService: TicketService, - private readonly schedulerRegistry: SchedulerRegistry, - ) {} - private splitIntervalIntoPeriods( interval: TimeInterval, chunkSize = 30, diff --git a/service/data-hub/data-connector/src/core/database/schema.gql b/service/data-hub/data-connector/src/core/database/schema.gql index 4f9ef11..35708da 100644 --- a/service/data-hub/data-connector/src/core/database/schema.gql +++ b/service/data-hub/data-connector/src/core/database/schema.gql @@ -66,6 +66,18 @@ type DocumentInfo { tdLocation: String } +type HomeDashboardKPIs { + anomalyCount: Int! + billableTourCount: Int! + billableTourRevenueSum: Float! + billedTourCount: Int! + billedTourNegativeRevenueDeviation: Float! + billedTourPositiveRevenueDeviation: Float! + employeesWithoutTourCount: Int! + revenueTrend: [RevenueTrend!]! + toursWithoutApprovalCount: Int! +} + type Interval { end: DateTime! start: DateTime! @@ -88,6 +100,17 @@ type KPIMetadata { tourAmount: Float! } +type KpiInfo { + additional: [Metric!]! + main: Metric! + secondary: Metric! +} + +type Metric { + label: String! + value: Float! +} + type Mutation { acceptAnomaly(id: String!): Anomaly! setAnomalyToSleep(id: String!): Anomaly! @@ -133,14 +156,31 @@ type Query { anomaliesProto: [Anomaly!]! anomaly(id: String!): Anomaly! groupedAnomalies(cursor: String, take: Int! = 10): PaginatedAnomalyGroup! + homeDashboardKpis: HomeDashboardKPIs! + managerKpi(ordinanceType: String!): KpiInfo! searchTickets(query: String!): [Ticket!]! ticket(id: String!): Ticket! ticketStateKeyFigures(state: TicketValidationState!): TicketStateKeyFigures! + ticketStateKpi(state: TicketValidationState!): KpiInfo! ticketStateMeta(state: TicketValidationState!): TicketStateMeta! tickets(cursor: String, filters: TicketFilterArgs, state: TicketValidationState!, take: Int! = 10): PaginatedTicket! timePerTourMetricForDay(day: DateTime!, ordinanceType: String!): [TimePerTourMetric!]! timePerTourMetricForMonth(day: DateTime!, ordinanceType: String!): [TimePerTourMetric!]! + tourCostBreakdown(operationId: String!): TourCostBreakdown! toursPerTimeKPI(ordinanceTypes: String!): [TimePerTourKPISummary!]! + upcomingTours: [Tour!]! +} + +type RevenueTrend { + date: DateTime! + ordinanceType: String! + revenueSum: Float! +} + +type ServicePosition { + description: String! + value: Float! + variant: String! } type SolutionTarget { @@ -287,7 +327,15 @@ type Tour { type: String! } +type TourCostBreakdown { + servicePositions: [ServicePosition!]! + tariffDescription: String! + tariffValidityPeriod: String! +} + type TourStateMeta { count: Int! + negativeRevenueDeviation: Float + positiveRevenueDeviation: Float revenueSum: Float } \ No newline at end of file diff --git a/service/data-hub/data-connector/src/main.ts b/service/data-hub/data-connector/src/main.ts index 17b24ea..20cc836 100644 --- a/service/data-hub/data-connector/src/main.ts +++ b/service/data-hub/data-connector/src/main.ts @@ -1,8 +1,12 @@ +// const tracer = require('./tracer'); +import tracer from './tracer' import { NestFactory } from '@nestjs/core'; import { AppModule } from './app.module'; import { ConsoleLogger } from '@nestjs/common'; async function bootstrap() { + await tracer.start(); + const app = await NestFactory.create(AppModule, { logger: new ConsoleLogger({ json: true }), }); diff --git a/service/data-hub/data-connector/src/modules/app-accounting/accounting-arg.types.ts b/service/data-hub/data-connector/src/modules/app-accounting/accounting-arg.types.ts index c157862..a4c35f7 100644 --- a/service/data-hub/data-connector/src/modules/app-accounting/accounting-arg.types.ts +++ b/service/data-hub/data-connector/src/modules/app-accounting/accounting-arg.types.ts @@ -34,4 +34,8 @@ export class TourStateMetaObjectType { count!: number; @Field(() => Float, { nullable: true }) revenueSum?: number; + @Field(() => Float, { nullable: true }) + positiveRevenueDeviation?: number; + @Field(() => Float, { nullable: true }) + negativeRevenueDeviation?: number; } diff --git a/service/data-hub/data-connector/src/modules/app-accounting/accounting-validation.repository.ts b/service/data-hub/data-connector/src/modules/app-accounting/accounting-validation.repository.ts index 86a2715..b4c61d8 100644 --- a/service/data-hub/data-connector/src/modules/app-accounting/accounting-validation.repository.ts +++ b/service/data-hub/data-connector/src/modules/app-accounting/accounting-validation.repository.ts @@ -170,7 +170,12 @@ export class AccountingValidationRepository { ], }; - const [count, revenueSum] = await this.prisma.$transaction([ + const [ + count, + revenueSum, + positiveRevenueDeviation, + negativeRevenueDeviation, + ] = await this.prisma.$transaction([ this.prisma.tour.count({ where: { ...ticketWithCurrentStateAndTours }, }), @@ -182,11 +187,37 @@ export class AccountingValidationRepository { ...ticketWithCurrentStateAndTours, }, }), + this.prisma.tour.aggregate({ + _sum: { + revenueDeviation: true, + }, + where: { + ...ticketWithCurrentStateAndTours, + revenueDeviation: { + gt: 0, + }, + }, + }), + this.prisma.tour.aggregate({ + _sum: { + revenueDeviation: true, + }, + where: { + ...ticketWithCurrentStateAndTours, + revenueDeviation: { + lt: 0, + }, + }, + }), ]); return { count, revenueSum: revenueSum._sum.revenue ?? 0, + positiveRevenueDeviation: + positiveRevenueDeviation._sum.revenueDeviation ?? 0, + negativeRevenueDeviation: + negativeRevenueDeviation._sum.revenueDeviation ?? 0, }; } diff --git a/service/data-hub/data-connector/src/modules/app-accounting/accounting-validation.resolver.ts b/service/data-hub/data-connector/src/modules/app-accounting/accounting-validation.resolver.ts index fd81780..07e3f8c 100644 --- a/service/data-hub/data-connector/src/modules/app-accounting/accounting-validation.resolver.ts +++ b/service/data-hub/data-connector/src/modules/app-accounting/accounting-validation.resolver.ts @@ -6,7 +6,7 @@ import { } from './accounting-arg.types'; import { AccountingState } from './accounting-state'; import { AccountingValidationService } from './accounting-validation.service'; -import { PaginatedTourObjectType } from './accounting.object-type'; +import { PaginatedTourObjectType, TourCostBreakdownObjectType } from './accounting.object-type'; import { TourObjectType } from './tour.object-type'; @Resolver(() => TourObjectType) @@ -28,6 +28,11 @@ export class AccountingValidationResolver { return this.service.getAccountingStateMeta(accountingState); } + @Query(() => TourCostBreakdownObjectType) + tourCostBreakdown(@Args('operationId') operationId: string) { + return this.service.getTourCostBreakdown(operationId) + } + @ResolveField(() => TicketObjectType, { nullable: true }) ticket(@Parent() tour: TourObjectType) { return this.service.findTicketByTicketId(tour.ticketId); diff --git a/service/data-hub/data-connector/src/modules/app-accounting/accounting-validation.service.ts b/service/data-hub/data-connector/src/modules/app-accounting/accounting-validation.service.ts index 6ecedce..13448d4 100644 --- a/service/data-hub/data-connector/src/modules/app-accounting/accounting-validation.service.ts +++ b/service/data-hub/data-connector/src/modules/app-accounting/accounting-validation.service.ts @@ -1,17 +1,21 @@ import { Injectable } from '@nestjs/common'; +import { + decodeOffsetCursor, + encodeCursor, +} from 'src/core/base/pagination.util'; import { TourStateMetaObjectType } from './accounting-arg.types'; import { AccountingFilter } from './accounting-filter'; import { AccountingState } from './accounting-state'; import { AccountingValidationRepository } from './accounting-validation.repository'; import { PaginatedTourObjectType } from './accounting.object-type'; -import { - decodeOffsetCursor, - encodeCursor, -} from 'src/core/base/pagination.util'; +import { AccountingService } from './accounting.service'; @Injectable() export class AccountingValidationService { - constructor(private readonly repository: AccountingValidationRepository) {} + constructor( + private readonly repository: AccountingValidationRepository, + private readonly accounting: AccountingService, + ) {} async paginateToursByState( state: AccountingState, @@ -49,4 +53,8 @@ export class AccountingValidationService { if (!ticketId) return; return this.repository.findTicketByTicketId(ticketId); } + + async getTourCostBreakdown(operationId: string) { + return this.accounting.tourCostBreakdown(operationId); + } } diff --git a/service/data-hub/data-connector/src/modules/app-accounting/accounting.object-type.ts b/service/data-hub/data-connector/src/modules/app-accounting/accounting.object-type.ts index bfb06df..bd58521 100644 --- a/service/data-hub/data-connector/src/modules/app-accounting/accounting.object-type.ts +++ b/service/data-hub/data-connector/src/modules/app-accounting/accounting.object-type.ts @@ -1,11 +1,33 @@ -import { ObjectType, registerEnumType } from '@nestjs/graphql'; +import { Field, Float, ObjectType, registerEnumType } from '@nestjs/graphql'; import { AccountingState } from './accounting-state'; import { Paginated } from 'src/core/base/pagination.input'; import { TourObjectType } from './tour.object-type'; - -@ObjectType('PaginatedTour') -export class PaginatedTourObjectType extends Paginated(TourObjectType) {} +import { CostTypeVariant } from '@prisma/client'; registerEnumType(AccountingState, { name: 'AccountingState', }); + +@ObjectType('PaginatedTour') +export class PaginatedTourObjectType extends Paginated(TourObjectType) {} + +@ObjectType('ServicePosition') +export class ServicePositionObjectType { + @Field() + variant: CostTypeVariant; + @Field() + description: string; + @Field(() => Float) + value: number; +} + +@ObjectType('TourCostBreakdown') +export class TourCostBreakdownObjectType { + @Field() + tariffDescription: string; + @Field() + tariffValidityPeriod: string; + + @Field(() => [ServicePositionObjectType]) + servicePositions: ServicePositionObjectType[]; +} diff --git a/service/data-hub/data-connector/src/modules/app-accounting/accounting.service.ts b/service/data-hub/data-connector/src/modules/app-accounting/accounting.service.ts new file mode 100644 index 0000000..357f7f8 --- /dev/null +++ b/service/data-hub/data-connector/src/modules/app-accounting/accounting.service.ts @@ -0,0 +1,50 @@ +import { Injectable } from '@nestjs/common'; +import { format } from 'date-fns'; +import { PrismaService } from 'src/core/database/prisma.service'; +import { CalculationService } from '../feat-calculation/calculation.service'; +import { TourCostBreakdownObjectType } from './accounting.object-type'; + +@Injectable() +export class AccountingService { + constructor( + private readonly prisma: PrismaService, + private readonly calculation: CalculationService, + ) {} + + async tourCostBreakdown( + operationId: string, + ): Promise { + const tour = await this.prisma.tour.findFirst({ + where: { operationId }, + }); + + const { tariff, servicePositions } = + await this.calculation.listProvidedServicePositions(tour); + + if (!tariff || servicePositions.length === 0) { + return { + tariffDescription: '!-- Tarif kann nicht ermittelt werden --!', + tariffValidityPeriod: '--', + servicePositions: [], + }; + } + + return { + tariffDescription: tariff.tariffGroup?.description, + tariffValidityPeriod: this.formatTariffValidityPeriod( + tariff.validFrom, + tariff.validTo, + ), + servicePositions: servicePositions.map(([costType, value]) => ({ + value, + variant: costType.variant, + description: costType.description, + })), + }; + } + + private formatTariffValidityPeriod(from: Date, to?: Date): string { + if (!to) return `ab ${format(new Date(from), 'yyyy-MM-dd')}`; + return `${format(new Date(from), 'yyyy-MM-dd')} - ${format(new Date(to), 'yyyy-MM-dd')}`; + } +} diff --git a/service/data-hub/data-connector/src/modules/app-accounting/app-accounting.module.ts b/service/data-hub/data-connector/src/modules/app-accounting/app-accounting.module.ts index c2d942e..dd6a130 100644 --- a/service/data-hub/data-connector/src/modules/app-accounting/app-accounting.module.ts +++ b/service/data-hub/data-connector/src/modules/app-accounting/app-accounting.module.ts @@ -1,15 +1,18 @@ import { Module } from '@nestjs/common'; import { PrismaModule } from 'src/core/database/prisma.module'; +import { FeatCalculationModule } from '../feat-calculation/feat-calculation.module'; import { AccountingValidationRepository } from './accounting-validation.repository'; import { AccountingValidationResolver } from './accounting-validation.resolver'; import { AccountingValidationService } from './accounting-validation.service'; +import { AccountingService } from './accounting.service'; @Module({ - imports: [PrismaModule], + imports: [PrismaModule, FeatCalculationModule], providers: [ AccountingValidationRepository, AccountingValidationResolver, AccountingValidationService, + AccountingService, ], exports: [], }) diff --git a/service/data-hub/data-connector/src/modules/app-control-center/app-control-center.module.ts b/service/data-hub/data-connector/src/modules/app-control-center/app-control-center.module.ts index 90d521c..01e9f94 100644 --- a/service/data-hub/data-connector/src/modules/app-control-center/app-control-center.module.ts +++ b/service/data-hub/data-connector/src/modules/app-control-center/app-control-center.module.ts @@ -2,9 +2,10 @@ import { Module } from '@nestjs/common'; import { ControlCenterResolver } from './control-center.resolver'; import { SolutionTargetsResolver } from './solution-targets.resolver'; import { AnomalyDetectionModule } from '../feat-anomalies/anomaly-detection.module'; +import { FeatKpiModule } from '../feat-kpis/feat-kpis.module'; @Module({ - imports: [AnomalyDetectionModule], + imports: [AnomalyDetectionModule, FeatKpiModule], providers: [ControlCenterResolver, SolutionTargetsResolver], }) export class ApplicationControlCenterModule {} diff --git a/service/data-hub/data-connector/src/modules/app-control-center/control-center.resolver.ts b/service/data-hub/data-connector/src/modules/app-control-center/control-center.resolver.ts index 0c0c733..c78e5e4 100644 --- a/service/data-hub/data-connector/src/modules/app-control-center/control-center.resolver.ts +++ b/service/data-hub/data-connector/src/modules/app-control-center/control-center.resolver.ts @@ -21,10 +21,16 @@ import { PaginatedAnomalyObjectType, SolutionTargetObjectType, } from './anomaly.object-type'; +import { KpiService } from '../feat-kpis/kpi.service'; @Resolver(() => AnomalyObjectType) export class ControlCenterResolver { - constructor(private readonly anomaliesService: AnomaliesService) {} + constructor(private readonly anomaliesService: AnomaliesService, private readonly kpiService: KpiService) {} + + @Query(() => [TourObjectType]) + async upcomingTours() { + return this.kpiService.upcomingTours(); + } @Query(() => AnomalyObjectType) async anomaly(@Args('id') id: string) { diff --git a/service/data-hub/data-connector/src/modules/app-home/app-home.module.ts b/service/data-hub/data-connector/src/modules/app-home/app-home.module.ts new file mode 100644 index 0000000..38ffafd --- /dev/null +++ b/service/data-hub/data-connector/src/modules/app-home/app-home.module.ts @@ -0,0 +1,10 @@ +import { Module } from '@nestjs/common'; +import { PrismaModule } from 'src/core/database/prisma.module'; +import { HomeResolver } from './home.resolver'; +import { HomeService } from './home.service'; + +@Module({ + imports: [PrismaModule], + providers: [HomeResolver, HomeService], +}) +export class AppHomeModule {} diff --git a/service/data-hub/data-connector/src/modules/app-home/home.object-type.ts b/service/data-hub/data-connector/src/modules/app-home/home.object-type.ts new file mode 100644 index 0000000..6d630ed --- /dev/null +++ b/service/data-hub/data-connector/src/modules/app-home/home.object-type.ts @@ -0,0 +1,33 @@ +import { Field, Float, Int, ObjectType } from '@nestjs/graphql'; + +@ObjectType('RevenueTrend') +export class RevenueTrendObjectType { + @Field(() => Date) + date: Date; + @Field() + ordinanceType: string; + @Field(() => Float) + revenueSum: number; +} + +@ObjectType('HomeDashboardKPIs') +export class HomeDashboardKPIsObjectType { + @Field(() => Int) + anomalyCount: number; + @Field(() => Int) + employeesWithoutTourCount: number; + @Field(() => Int) + toursWithoutApprovalCount: number; + @Field(() => Int) + billableTourCount: number; + @Field(() => Float) + billableTourRevenueSum: number; + @Field(() => Int) + billedTourCount: number; + @Field(() => Float) + billedTourPositiveRevenueDeviation: number; + @Field(() => Float) + billedTourNegativeRevenueDeviation: number; + @Field(() => [RevenueTrendObjectType]) + revenueTrend: RevenueTrendObjectType[]; +} diff --git a/service/data-hub/data-connector/src/modules/app-home/home.resolver.ts b/service/data-hub/data-connector/src/modules/app-home/home.resolver.ts new file mode 100644 index 0000000..516a6be --- /dev/null +++ b/service/data-hub/data-connector/src/modules/app-home/home.resolver.ts @@ -0,0 +1,13 @@ +import { Query, Resolver } from '@nestjs/graphql'; +import { HomeDashboardKPIsObjectType } from './home.object-type'; +import { HomeService } from './home.service'; + +@Resolver() +export class HomeResolver { + constructor(private readonly service: HomeService) {} + + @Query(() => HomeDashboardKPIsObjectType) + homeDashboardKpis() { + return this.service.homeDashboardKpis(); + } +} diff --git a/service/data-hub/data-connector/src/modules/app-home/home.service.ts b/service/data-hub/data-connector/src/modules/app-home/home.service.ts new file mode 100644 index 0000000..1050924 --- /dev/null +++ b/service/data-hub/data-connector/src/modules/app-home/home.service.ts @@ -0,0 +1,444 @@ +import { Injectable } from '@nestjs/common'; +import { ApprovalState, Prisma, Tour } from '@prisma/client'; +import { addDays, endOfDay, format, startOfDay, subDays } from 'date-fns'; +import { PrismaService } from 'src/core/database/prisma.service'; +import { AnomalyTypes } from '../feat-anomalies/anomaly-detectors/anomaly-types.enum'; +import { + HomeDashboardKPIsObjectType, + RevenueTrendObjectType, +} from './home.object-type'; + +@Injectable() +export class HomeService { + constructor(private readonly prisma: PrismaService) {} + + async homeDashboardKpis(): Promise { + const anomalyCount = await this.getAnomalyCount(); + const employeesWithoutTourCount = await this.getEmployeesWithoutTourCount(); + const toursWithoutApprovalCount = await this.getToursWithoutApprovalCount(); + const billableTourCount = await this.getBillableTourCount(); + const billableTourRevenueSum = await this.getBillableTourRevenueSum(); + const { + tourCount: billedTourCount, + positiveRevenueDeviation: billedTourPositiveRevenueDeviation, + negativeRevenueDeviation: billedTourNegativeRevenueDeviation, + } = await this.getBilledTourKPIs(); + const revenueTrend = await this.getRevenueTrend(); + + return { + anomalyCount, + employeesWithoutTourCount, + toursWithoutApprovalCount, + billableTourCount, + billableTourRevenueSum, + billedTourCount, + billedTourPositiveRevenueDeviation, + billedTourNegativeRevenueDeviation, + revenueTrend, + }; + } + + private async getAnomalyCount(): Promise { + return await this.prisma.anomaly.count({ + where: { + resolvedAt: null, + }, + }); + } + + private async getEmployeesWithoutTourCount(): Promise { + return await this.prisma.anomaly.count({ + where: { + type: AnomalyTypes.WorkingEmployeeNotInDistributionSystem, + resolvedAt: null, + }, + }); + } + + private async getToursWithoutApprovalCount(): Promise { + return await this.prisma.tour.count({ + where: { + startDate: { + gte: startOfDay(addDays(new Date(), 3)), + }, + OR: [ + { + Ticket: { + approvalState: ApprovalState.UNKNOWN, + }, + }, + { + Ticket: { + approvalState: ApprovalState.REQUIRED, + }, + }, + ], + }, + }); + } + + private async getBillableTourCount(): Promise { + return await this.prisma.tour.count({ + where: { + done: true, + check: 0, + empty: { not: null }, + ticketId: { not: null }, + occupiedKm: { + lt: 9000, + }, + AND: [ + { + OR: [ + { + carName: null, + }, + { + AND: [ + { + carName: { + not: 'Storno', + }, + }, + { + carName: { + not: 'Löschen', + }, + }, + { + carName: { + not: 'Abgabe', + }, + }, + ], + }, + ], + }, + { + deletedAt: null, + }, + { + OR: [ + { patientId: null }, + { + AND: [ + { + patientId: { + // Pause + not: 'b7424477-a4b2-42f7-b7e7-a4bef24f6979', + }, + }, + { + patientId: { + // Feierabend + not: '3554e1a9-9c07-45e5-b53c-692a77e4fa9a', + }, + }, + ], + }, + ], + }, + ], + }, + }); + } + + private async getBillableTourRevenueSum(): Promise { + const aggr = await this.prisma.tour.aggregate({ + _sum: { + revenue: true, + }, + where: { + done: true, + check: 0, + empty: { not: null }, + ticketId: { not: null }, + occupiedKm: { + lt: 9000, + }, + AND: [ + { + OR: [ + { + carName: null, + }, + { + AND: [ + { + carName: { + not: 'Storno', + }, + }, + { + carName: { + not: 'Löschen', + }, + }, + { + carName: { + not: 'Abgabe', + }, + }, + ], + }, + ], + }, + { + deletedAt: null, + }, + { + OR: [ + { patientId: null }, + { + AND: [ + { + patientId: { + // Pause + not: 'b7424477-a4b2-42f7-b7e7-a4bef24f6979', + }, + }, + { + patientId: { + // Feierabend + not: '3554e1a9-9c07-45e5-b53c-692a77e4fa9a', + }, + }, + ], + }, + ], + }, + ], + }, + }); + return aggr._sum.revenue; + } + + private async getBilledTourKPIs(): Promise<{ + tourCount: number; + positiveRevenueDeviation: number; + negativeRevenueDeviation: number; + }> { + const toursWithCurrentState: Prisma.TourWhereInput = { + check: 2, + revenueDeviation: { not: 0 }, + empty: { + not: null, + }, + ticketId: { + not: null, + }, + occupiedKm: { + lt: 9000, + }, + AND: [ + { + OR: [ + { + carName: null, + }, + { + AND: [ + { + carName: { + not: 'Storno', + }, + }, + { + carName: { + not: 'Löschen', + }, + }, + { + carName: { + not: 'Abgabe', + }, + }, + ], + }, + ], + }, + { + deletedAt: null, + }, + { + OR: [ + { patientId: null }, + { + AND: [ + { + patientId: { + // Pause + not: 'b7424477-a4b2-42f7-b7e7-a4bef24f6979', + }, + }, + { + patientId: { + // Feierabend + not: '3554e1a9-9c07-45e5-b53c-692a77e4fa9a', + }, + }, + ], + }, + ], + }, + ], + }; + + const [tourCount, positiveRevenueDeviation, negativeRevenueDeviation] = + await this.prisma.$transaction([ + this.prisma.tour.count({ + where: { ...toursWithCurrentState }, + }), + this.prisma.tour.aggregate({ + _sum: { + revenueDeviation: true, + }, + where: { + ...toursWithCurrentState, + revenueDeviation: { + gt: 0, + }, + }, + }), + this.prisma.tour.aggregate({ + _sum: { + revenueDeviation: true, + }, + where: { + ...toursWithCurrentState, + revenueDeviation: { + lt: 0, + }, + }, + }), + ]); + + return { + tourCount, + positiveRevenueDeviation: + positiveRevenueDeviation._sum.revenueDeviation ?? 0, + negativeRevenueDeviation: + negativeRevenueDeviation._sum.revenueDeviation ?? 0, + }; + } + + private async getRevenueTrend(): Promise { + const tours = await this.getTours(); + + const toursPerDay = tours.reduce( + (acc, tour) => { + const tourDay = format(new Date(tour.startDate), 'yyyy-MM-dd'); + + return { + ...acc, + [tourDay]: [...(acc[tourDay]?.length ? acc[tourDay] : []), tour], + }; + }, + {} as Record, + ) as Record; + + const revenueTrend = Object.entries(toursPerDay).flatMap(([day, tours]) => { + const toursByOrdinanceType = tours.reduce( + (acc, tour) => { + return { + ...acc, + [tour.ordinanceType]: [ + ...(acc[tour.ordinanceType] ? acc[tour.ordinanceType] : []), + tour, + ], + }; + }, + {} as Record, + ); + return Object.entries(toursByOrdinanceType).map(([ot, tours]) => { + const revenueSum = tours.reduce( + (sum, { revenue }) => (sum += revenue), + 0, + ); + return { + revenueSum, + date: new Date(day), + ordinanceType: ot, + }; + }); + }); + + return revenueTrend; + } + + private getTours(): Promise { + return this.prisma.tour.findMany({ + where: { + AND: [ + { + startDate: { + gte: startOfDay(subDays(new Date(), 10)), + lte: endOfDay(new Date()), + }, + }, + { + AND: [ + {ordinanceType: {not: null}}, + {ordinanceType: {not: 'Tragehilfe'}}, + ] + }, + { + OR: [ + { + carName: null, + }, + { + AND: [ + { + carName: { + not: 'Storno', + }, + }, + { + carName: { + not: 'Löschen', + }, + }, + { + carName: { + not: 'Abgabe', + }, + }, + ], + }, + ], + }, + { + check: { + not: 3, + }, + }, + { + occupiedKm: { + lt: 9999, + }, + }, + { + OR: [ + { + patientId: null, + }, + { + patientId: { + // Pause + not: 'b7424477-a4b2-42f7-b7e7-a4bef24f6979', + }, + }, + { + patientId: { + // Feierabend + not: '3554e1a9-9c07-45e5-b53c-692a77e4fa9a', + }, + }, + ], + }, + ], + }, + }); + } +} diff --git a/service/data-hub/data-connector/src/modules/app-manager/app-manager.module.ts b/service/data-hub/data-connector/src/modules/app-manager/app-manager.module.ts index 818a3f4..2c823be 100644 --- a/service/data-hub/data-connector/src/modules/app-manager/app-manager.module.ts +++ b/service/data-hub/data-connector/src/modules/app-manager/app-manager.module.ts @@ -1,22 +1,19 @@ import { Module } from '@nestjs/common'; import { PrismaModule } from 'src/core/database/prisma.module'; -import { FeatureCalculationModule } from '../feat-calculation/feat-calculation.module'; -import { TourAmountForecastService } from './tour-amount-forecast.service'; +import { FeatBusinessObjectsModule } from '../feat-business-objects/feat-business-objects.module'; +import { FeatCalculationModule } from '../feat-calculation/feat-calculation.module'; +import { ManagerResolver } from './manager.resolver'; import { TimePerTourKpiService } from './time-per-tour-kpi.service'; import { TimePerTourMetricsService } from './time-per-tour-metrics.service'; -import { ManagerResolver } from './manager.resolver'; -import { CarEntityService } from './car-entity/car-entity.service'; -import { CarEntityRepository } from './car-entity/car-entity.repository'; +import { TourAmountForecastService } from './tour-amount-forecast.service'; @Module({ - imports: [PrismaModule, FeatureCalculationModule], + imports: [PrismaModule, FeatCalculationModule, FeatBusinessObjectsModule], providers: [ TourAmountForecastService, TimePerTourKpiService, TimePerTourMetricsService, - CarEntityService, - CarEntityRepository, ManagerResolver, ], }) -export class ApplicationManagerModule {} +export class ManagerModule {} diff --git a/service/data-hub/data-connector/src/modules/app-manager/time-per-tour-kpi.service.ts b/service/data-hub/data-connector/src/modules/app-manager/time-per-tour-kpi.service.ts index 6719c8c..127fb12 100644 --- a/service/data-hub/data-connector/src/modules/app-manager/time-per-tour-kpi.service.ts +++ b/service/data-hub/data-connector/src/modules/app-manager/time-per-tour-kpi.service.ts @@ -3,10 +3,10 @@ import { OnEvent } from '@nestjs/event-emitter'; import { addMilliseconds } from 'date-fns'; import { PubSub } from 'graphql-subscriptions'; import { generateIntervalForTimeRange } from 'src/utils'; -import { CarEntityService } from './car-entity/car-entity.service'; import { CalculationService } from '../feat-calculation/calculation.service'; import { ETLEventTypes } from '../feat-etl/feat-importers/events/event-types.enum'; import { LoadingDoneEvent } from '../feat-etl/feat-importers/events/loading-done.event'; +import { CarEntityService } from '../feat-business-objects/car-entity/car-entity.service'; @Injectable() export class TimePerTourKpiService { diff --git a/service/data-hub/data-connector/src/modules/app-manager/time-per-tour-metrics.service.ts b/service/data-hub/data-connector/src/modules/app-manager/time-per-tour-metrics.service.ts index 2e3cc88..9e4b42d 100644 --- a/service/data-hub/data-connector/src/modules/app-manager/time-per-tour-metrics.service.ts +++ b/service/data-hub/data-connector/src/modules/app-manager/time-per-tour-metrics.service.ts @@ -15,11 +15,11 @@ import { startOfDay, startOfMonth, } from 'date-fns'; -import { CarEntityService } from './car-entity/car-entity.service'; import { TourAmountForecastService } from './tour-amount-forecast.service'; import { TimePerTourMetricObjectType } from './manager.object-type'; import { CalculationService } from '../feat-calculation/calculation.service'; import { generateIntervalForTimeRange, groupBy } from 'src/utils'; +import { CarEntityService } from '../feat-business-objects/car-entity/car-entity.service'; @Injectable() export class TimePerTourMetricsService { diff --git a/service/data-hub/data-connector/src/modules/app-ticket-system/ticket-lifecycle.service.ts b/service/data-hub/data-connector/src/modules/app-ticket-system/ticket-lifecycle.service.ts index 3d0362e..e3d9c5a 100644 --- a/service/data-hub/data-connector/src/modules/app-ticket-system/ticket-lifecycle.service.ts +++ b/service/data-hub/data-connector/src/modules/app-ticket-system/ticket-lifecycle.service.ts @@ -112,12 +112,28 @@ export class TicketLifecycleService { : ApprovalState.REQUIRED, }); } else { - await this.repository.updateTicket(ticket.id, { - errors, - notes, - state: TicketValidationState.USER_INTERACTION_REQUIRED, - approvalState: ApprovalState.FREE, - }); + // NOTE: Condition required to get these tickets out of USER_INTERACTION_REQUIRED + if ( + ticket.tours.every( + ({ ordinanceType }) => + ordinanceType.indexOf('BTW') > -1 || + ordinanceType.indexOf('TSW') > -1, + ) + ) { + await this.repository.updateTicket(ticket.id, { + errors, + notes, + state: TicketValidationState.TD_UNCERTAIN, + approvalState: ApprovalState.FREE, + }); + } else { + await this.repository.updateTicket(ticket.id, { + errors, + notes, + state: TicketValidationState.USER_INTERACTION_REQUIRED, + approvalState: ApprovalState.FREE, + }); + } } } else { await this.repository.setActionablesOnTicket(ticket.id, errors, notes); @@ -186,6 +202,9 @@ export class TicketLifecycleService { const approvalRequirements = await Promise.all( ticket.tours.map((tour) => this.checkTourApprovalRequirement(tour)), ); + if(ticket.tours.some(({ordinanceType}) => ordinanceType.indexOf('TSW') > -1)) { + console.log(approvalRequirements) + } const isApprovalRequired = approvalRequirements.reduce( (result, requirement) => result || requirement, false, @@ -204,6 +223,14 @@ export class TicketLifecycleService { } private async checkTourApprovalRequirement(tour: Tour): Promise { + // NOTE: Requirement by Avicenna + if ( + tour.ordinanceType.indexOf('BTW') > -1 || + tour.ordinanceType.indexOf('TSW') > -1 + ) { + return false; + } + if ( [ 'Einweisung', diff --git a/service/data-hub/data-connector/src/modules/app-ticket-system/ticket-validation.functions.ts b/service/data-hub/data-connector/src/modules/app-ticket-system/ticket-validation.functions.ts index 7258667..87705fe 100644 --- a/service/data-hub/data-connector/src/modules/app-ticket-system/ticket-validation.functions.ts +++ b/service/data-hub/data-connector/src/modules/app-ticket-system/ticket-validation.functions.ts @@ -27,15 +27,15 @@ export function validatePatient(patient: Patient): ValidationResult { isValid = false; errors.push('Patient: Krankenkasse ist nicht gefüllt'); } - if (!patient?.careDegree) { - notes.push('Patient: Pflegegrad ist nicht gefüllt'); - } - if (!patient?.disabilityMark1) { - notes.push('Patient: Merkzeichen 1 ist nicht gefüllt'); - } - if (!patient?.disabilityMark2) { - notes.push('Patient: Merkzeichen 2 ist nicht gefüllt'); - } + // if (!patient?.careDegree) { + // notes.push('Patient: Pflegegrad ist nicht gefüllt'); + // } + // if (!patient?.disabilityMark1) { + // notes.push('Patient: Merkzeichen 1 ist nicht gefüllt'); + // } + // if (!patient?.disabilityMark2) { + // notes.push('Patient: Merkzeichen 2 ist nicht gefüllt'); + // } return { result: isValid, diff --git a/service/data-hub/data-connector/src/modules/feat-anomalies/anomaly-detectors/employees-logged-in.detector.ts b/service/data-hub/data-connector/src/modules/feat-anomalies/anomaly-detectors/employees-logged-in.detector.ts index 6b7eeb1..b5d61ee 100644 --- a/service/data-hub/data-connector/src/modules/feat-anomalies/anomaly-detectors/employees-logged-in.detector.ts +++ b/service/data-hub/data-connector/src/modules/feat-anomalies/anomaly-detectors/employees-logged-in.detector.ts @@ -200,11 +200,11 @@ export class EmployeesLoggedInDetector extends AnomalyDetector { return false; } if (!employee.personnelNumber) { - this.logger.warn(`Employee has no personnelNumber`, { + this.logger.warn(`Employee has no personnelNumber ${JSON.stringify({ id: employee.id, surname: employee.surname, name: employee.name, - }); + })}`); return false; } return true; diff --git a/service/data-hub/data-connector/src/modules/feat-anomalies/anomaly-detectors/working-employee-not-in-distribution-system.detector.ts b/service/data-hub/data-connector/src/modules/feat-anomalies/anomaly-detectors/working-employee-not-in-distribution-system.detector.ts index 149e841..bd9141f 100644 --- a/service/data-hub/data-connector/src/modules/feat-anomalies/anomaly-detectors/working-employee-not-in-distribution-system.detector.ts +++ b/service/data-hub/data-connector/src/modules/feat-anomalies/anomaly-detectors/working-employee-not-in-distribution-system.detector.ts @@ -86,9 +86,16 @@ export class WorkingEmployeeNotInDistributionSystemDetector extends AnomalyDetec const employeeId = employeeIdParts.join('-'); const employee = await this.dataService.findEmployeeById(employeeId); + if (!employee || !employee?.personnelNumber) { + this.logger.error( + `Cannot verify anomaly ${anomaly.id}. Employee (${employeeId}) does not exist or cannot be synced ${JSON.stringify(employee)}`, + ); + return anomaly; + } + const plannedTime = await this.dataService.findPlannedTimeByPersonnelNumberForDay( - `${employee.personnelNumber}`, + `${employee?.personnelNumber}`, attendanceRegistration.dateTime, ); if ( diff --git a/service/data-hub/data-connector/src/modules/app-manager/car-entity/car-entity.repository.ts b/service/data-hub/data-connector/src/modules/feat-business-objects/car-entity/car-entity.repository.ts similarity index 90% rename from service/data-hub/data-connector/src/modules/app-manager/car-entity/car-entity.repository.ts rename to service/data-hub/data-connector/src/modules/feat-business-objects/car-entity/car-entity.repository.ts index 5f8ec93..2655d89 100644 --- a/service/data-hub/data-connector/src/modules/app-manager/car-entity/car-entity.repository.ts +++ b/service/data-hub/data-connector/src/modules/feat-business-objects/car-entity/car-entity.repository.ts @@ -98,11 +98,15 @@ export class CarEntityRepository { }, { AND: [ - { - department: { - contains: ordinanceType, - }, - }, + ...(ordinanceType !== 'ALL' + ? [ + { + department: { + contains: ordinanceType, + }, + }, + ] + : []), { department: { not: 'Leitstelle', @@ -113,6 +117,11 @@ export class CarEntityRepository { not: 'Büro', }, }, + { + department: { + not: 'Fortbildung', + }, + }, ], }, { diff --git a/service/data-hub/data-connector/src/modules/app-manager/car-entity/car-entity.service.ts b/service/data-hub/data-connector/src/modules/feat-business-objects/car-entity/car-entity.service.ts similarity index 100% rename from service/data-hub/data-connector/src/modules/app-manager/car-entity/car-entity.service.ts rename to service/data-hub/data-connector/src/modules/feat-business-objects/car-entity/car-entity.service.ts diff --git a/service/data-hub/data-connector/src/modules/app-manager/car-entity/car.entity.ts b/service/data-hub/data-connector/src/modules/feat-business-objects/car-entity/car.entity.ts similarity index 98% rename from service/data-hub/data-connector/src/modules/app-manager/car-entity/car.entity.ts rename to service/data-hub/data-connector/src/modules/feat-business-objects/car-entity/car.entity.ts index a8a34fd..35042e6 100644 --- a/service/data-hub/data-connector/src/modules/app-manager/car-entity/car.entity.ts +++ b/service/data-hub/data-connector/src/modules/feat-business-objects/car-entity/car.entity.ts @@ -138,7 +138,7 @@ export class CarEntity { }`; } - private plannedTimeIntervalInInterval(interval: Interval): Interval { + public plannedTimeIntervalInInterval(interval: Interval): Interval { return this.plannedTimes .map(({ startDate, endDate }) => ({ start: new Date(startDate), diff --git a/service/data-hub/data-connector/src/modules/feat-business-objects/feat-business-objects.module.ts b/service/data-hub/data-connector/src/modules/feat-business-objects/feat-business-objects.module.ts new file mode 100644 index 0000000..f7342f7 --- /dev/null +++ b/service/data-hub/data-connector/src/modules/feat-business-objects/feat-business-objects.module.ts @@ -0,0 +1,11 @@ +import { Module } from "@nestjs/common"; +import { PrismaModule } from "src/core/database/prisma.module"; +import { CarEntityRepository } from "./car-entity/car-entity.repository"; +import { CarEntityService } from "./car-entity/car-entity.service"; + +@Module({ + imports: [PrismaModule], + exports: [CarEntityService], + providers: [CarEntityRepository, CarEntityService] +}) +export class FeatBusinessObjectsModule {} \ No newline at end of file diff --git a/service/data-hub/data-connector/src/modules/feat-calculation/calculation.service.ts b/service/data-hub/data-connector/src/modules/feat-calculation/calculation.service.ts index 6a786b3..4448182 100644 --- a/service/data-hub/data-connector/src/modules/feat-calculation/calculation.service.ts +++ b/service/data-hub/data-connector/src/modules/feat-calculation/calculation.service.ts @@ -6,22 +6,21 @@ import { TariffGroup, Tour, } from '@prisma/client'; -import { - Interval, - addDays, - isSameDay, - isSaturday, - isWeekend, - isWithinInterval, -} from 'date-fns'; -import { toZonedTime } from 'date-fns-tz'; +import { Interval, addDays, isSaturday, isWithinInterval } from 'date-fns'; import { PrismaService } from 'src/core/database/prisma.service'; import { generateIntervalForTimeRange } from 'src/utils'; import { BILLING_INFORMATION_BY_ORDINANCE_TYPE } from './billing-information-by-ordinance-type'; -import { INFECTION_TYPES } from './infection-types'; +import { + calculateDesinfektionszuschlag, + calculateFahrzeugzuschlag, + calculateFeiertagszuschlag, + calculateKilometerzuschlag, + calculateNachtzuschlag, + calculateTSW, + calculateWochenendzuschlag, +} from './cost-type-calculations'; import { PersonnelCostCalculationService } from './personnel-cost-calculation.service'; -import { PUBLIC_HOLIDAYS_HH } from './public-holidays'; enum OrdinanceTypes { BTW = 'BTW', @@ -56,10 +55,39 @@ export class CalculationService { ); return 0; } - const revenue = this.calculateRevenue(tour, tariff) / 100; + const revenue = + this.calculateProvidedServicePositions(tour, tariff).reduce( + (sum, [, value]) => (sum += value), + 0, + ) / 100; return revenue; } + async listProvidedServicePositions(tour: Tour): Promise<{ + tariff: Tariff & { costTypes: CostType[]; tariffGroup: TariffGroup }; + servicePositions: [CostType, number][]; + }> { + const { healthInsurance, ordinanceType, startDate } = tour; + if (!ordinanceType) { + return { tariff: undefined, servicePositions: [] }; + } + const tariff = await this.findTariff( + healthInsurance, + ordinanceType.match(/([A-Z])\w+/).at(0), + new Date(startDate), + ); + if (!tariff) { + this.logger.warn( + `No tariff found for tour ${tour.operationId} (${healthInsurance}, ${ordinanceType}, ${startDate})`, + ); + return { tariff: undefined, servicePositions: [] }; + } + return { + tariff, + servicePositions: this.calculateProvidedServicePositions(tour, tariff), + }; + } + public calculatePersonnelCostInInterval( interval: Interval, employeeAmount: number, @@ -172,50 +200,58 @@ export class CalculationService { return billingInformation[1]; } - private calculateRevenue( + private calculateProvidedServicePositions( tour: Tour, tariff: Tariff & { costTypes: CostType[]; tariffGroup: TariffGroup }, - ): number { + ): [CostType, number][] { const highestZuschlag = this.getHighestZuschlag(tour, tariff); // if TariffGroup is VDEK KTW, sum up costTypes const isVdek = tariff.tariffGroup?.description?.indexOf('VDEK KTW') > -1; - return tariff.costTypes.reduce((sum, costType) => { - switch (costType.variant) { - case CostTypeVariant.GRUNDPREIS: - // TODO: decide if you need a CostTypeVariant for QMS Zuschlag and exclude the category there - if ( - costType.description.indexOf('QMS') > -1 && - tour.category === 'Privatfahrt Rechnung' - ) { - return sum; - } - return sum + costType.costAmount; - case CostTypeVariant.TSWDIFFERENZIERUNG: - return sum + this.calculateTSW(tour, costType); - case CostTypeVariant.DESINFEKTIONSZUSCHLAG: - return sum + this.calculateDesinfektionszuschlag(tour, costType); - case CostTypeVariant.KILOMETERZUSCHLAG: - return sum + this.calculateKilometerzuschlag(tour, costType); - case CostTypeVariant.FAHRZEUGZUSCHLAG: - return sum + this.calculateFahrzeugzuschlag(tour, costType); - case CostTypeVariant.NACHTZUSCHLAG: - if (highestZuschlag === CostTypeVariant.NACHTZUSCHLAG || isVdek) { - return sum + this.calculateNachtzuschlag(tour, costType); - } - return sum; - case CostTypeVariant.WOCHENENDZUSCHLAG: - if (highestZuschlag === CostTypeVariant.WOCHENENDZUSCHLAG || isVdek) { - return sum + this.calculateWochenendzuschlag(tour, costType); - } - return sum; - case CostTypeVariant.FEIERTAGSZUSCHLAG: - if (highestZuschlag === CostTypeVariant.FEIERTAGSZUSCHLAG || isVdek) { - return sum + this.calculateFeiertagszuschlag(tour, costType); - } - return sum; - } - }, 0); + return tariff.costTypes + .map((costType) => { + switch (costType.variant) { + case CostTypeVariant.GRUNDPREIS: + // TODO: decide if you need a CostTypeVariant for QMS Zuschlag and exclude the category there + if ( + costType.description.indexOf('QMS') > -1 && + tour.category === 'Privatfahrt Rechnung' + ) { + return [costType, 0]; + } + return [costType, costType.costAmount]; + case CostTypeVariant.TSWDIFFERENZIERUNG: + return [costType, calculateTSW(tour, costType)]; + case CostTypeVariant.DESINFEKTIONSZUSCHLAG: + return [costType, calculateDesinfektionszuschlag(tour, costType)]; + case CostTypeVariant.KILOMETERZUSCHLAG: + return [costType, calculateKilometerzuschlag(tour, costType)]; + case CostTypeVariant.FAHRZEUGZUSCHLAG: + return [costType, calculateFahrzeugzuschlag(tour, costType)]; + case CostTypeVariant.NACHTZUSCHLAG: + if (highestZuschlag === CostTypeVariant.NACHTZUSCHLAG || isVdek) { + return [costType, calculateNachtzuschlag(tour, costType)]; + } + return [costType, 0]; + case CostTypeVariant.WOCHENENDZUSCHLAG: + if ( + highestZuschlag === CostTypeVariant.WOCHENENDZUSCHLAG || + isVdek + ) { + return [costType, calculateWochenendzuschlag(tour, costType)]; + } + return [costType, 0]; + case CostTypeVariant.FEIERTAGSZUSCHLAG: + if ( + highestZuschlag === CostTypeVariant.FEIERTAGSZUSCHLAG || + isVdek + ) { + return [costType, calculateFeiertagszuschlag(tour, costType)]; + } + return [costType, 0]; + } + }) + .filter(([, value]) => value !== 0) as [CostType, number][]; } private getHighestZuschlag( @@ -235,17 +271,17 @@ export class CalculationService { case CostTypeVariant.NACHTZUSCHLAG: return [ CostTypeVariant.NACHTZUSCHLAG, - this.calculateNachtzuschlag(tour, costType), + calculateNachtzuschlag(tour, costType), ]; case CostTypeVariant.WOCHENENDZUSCHLAG: return [ CostTypeVariant.WOCHENENDZUSCHLAG, - this.calculateWochenendzuschlag(tour, costType), + calculateWochenendzuschlag(tour, costType), ]; case CostTypeVariant.FEIERTAGSZUSCHLAG: return [ CostTypeVariant.FEIERTAGSZUSCHLAG, - this.calculateFeiertagszuschlag(tour, costType), + calculateFeiertagszuschlag(tour, costType), ]; } }) @@ -260,99 +296,6 @@ export class CalculationService { return zuschlaegeHighestToLowest[0][0]; } - private calculateDesinfektionszuschlag( - tour: Tour, - costType: CostType, - ): number { - if (tour.hasInfection && !tour.infectionName) { - return 0; - } - if ( - tour.hasInfection && - (tour.infectionName.indexOf(costType.infectionType) > -1 || - INFECTION_TYPES[tour.infectionName] === costType.infectionType) - ) { - return costType.costAmount; - } - return 0; - } - - private calculateTSW(tour: Tour, costType: CostType): number { - if ( - costType.description.includes('TS+R') && - tour.transportType === 'TS+R' - ) { - return costType.costAmount; - } else if ( - (costType.description.includes('TS 1') || - costType.description.includes('TSW 1')) && - tour.driverId === tour.codriverId - ) { - return costType.costAmount; - } else if ( - (costType.description.includes('TS 2') || - costType.description.includes('TSW 2')) && - tour.driverId !== tour.codriverId - ) { - return costType.costAmount; - } - return 0; - } - - private calculateFeiertagszuschlag(tour: Tour, costType: CostType): number { - if ( - PUBLIC_HOLIDAYS_HH.some((day) => - isSameDay( - new Date(day), - new Date(toZonedTime(tour.startDate, 'Europe/Berlin')), - ), - ) - ) { - return costType.costAmount; - } - return 0; - } - - private calculateNachtzuschlag(tour: Tour, costType: CostType): number { - const firstInterval = generateIntervalForTimeRange( - costType.timeRange, - 'Europe/Berlin', - addDays(tour.startDate, -1), - ); - const secondInterval = generateIntervalForTimeRange( - costType.timeRange, - 'Europe/Berlin', - tour.startDate, - ); - if ( - isWithinInterval(tour.startDate, firstInterval) || - isWithinInterval(tour.startDate, secondInterval) - ) { - return costType.costAmount; - } - return 0; - } - - private calculateKilometerzuschlag(tour: Tour, costType: CostType): number { - const kilometerOverLimit = Math.ceil( - tour.occupiedKm - costType.kmInclusive, - ); - if (kilometerOverLimit <= 0) return 0; - return costType.costAmount * kilometerOverLimit; - } - - private calculateFahrzeugzuschlag(tour: Tour, costType: CostType): number { - const isCarNameSupported = !costType.excludeCarNames.includes(tour.carName); - if (!isCarNameSupported) return 0; - return costType.costAmount; - } - - private calculateWochenendzuschlag(tour: Tour, costType: CostType): number { - if (isWeekend(toZonedTime(tour.startDate, 'Europe/Berlin'))) - return costType.costAmount; - return 0; - } - private async findTariff( healthInsurance: string, ordinanceType: string, diff --git a/service/data-hub/data-connector/src/modules/feat-calculation/cost-type-calculations.ts b/service/data-hub/data-connector/src/modules/feat-calculation/cost-type-calculations.ts new file mode 100644 index 0000000..5bf8153 --- /dev/null +++ b/service/data-hub/data-connector/src/modules/feat-calculation/cost-type-calculations.ts @@ -0,0 +1,106 @@ +import { CostType, Tour } from '@prisma/client'; +import { addDays, isSameDay, isWeekend, isWithinInterval } from 'date-fns'; +import { toZonedTime } from 'date-fns-tz'; +import { generateIntervalForTimeRange } from 'src/utils'; +import { INFECTION_TYPES } from './infection-types'; +import { PUBLIC_HOLIDAYS_HH } from './public-holidays'; + +export function calculateDesinfektionszuschlag( + tour: Tour, + costType: CostType, +): number { + if (tour.hasInfection && !tour.infectionName) { + return 0; + } + if ( + tour.hasInfection && + (tour.infectionName.indexOf(costType.infectionType) > -1 || + INFECTION_TYPES[tour.infectionName] === costType.infectionType) + ) { + return costType.costAmount; + } + return 0; +} + +export function calculateTSW(tour: Tour, costType: CostType): number { + if (costType.description.includes('TS+R') && tour.transportType === 'TS+R') { + return costType.costAmount; + } else if ( + (costType.description.includes('TS 1') || + costType.description.includes('TSW 1')) && + tour.transportType === 'tsw' + ) { + return costType.costAmount; + } else if ( + (costType.description.includes('TS 2') || + costType.description.includes('TSW 2')) && + tour.transportType === 'TS+T' + ) { + return costType.costAmount; + } + return 0; +} + +export function calculateFeiertagszuschlag( + tour: Tour, + costType: CostType, +): number { + if ( + PUBLIC_HOLIDAYS_HH.some((day) => + isSameDay( + new Date(day), + new Date(toZonedTime(tour.startDate, 'Europe/Berlin')), + ), + ) + ) { + return costType.costAmount; + } + return 0; +} + +export function calculateNachtzuschlag(tour: Tour, costType: CostType): number { + const firstInterval = generateIntervalForTimeRange( + costType.timeRange, + 'Europe/Berlin', + addDays(tour.startDate, -1), + ); + const secondInterval = generateIntervalForTimeRange( + costType.timeRange, + 'Europe/Berlin', + tour.startDate, + ); + if ( + isWithinInterval(tour.startDate, firstInterval) || + isWithinInterval(tour.startDate, secondInterval) + ) { + return costType.costAmount; + } + return 0; +} + +export function calculateKilometerzuschlag( + tour: Tour, + costType: CostType, +): number { + const kilometerOverLimit = Math.ceil(tour.occupiedKm - costType.kmInclusive); + if (kilometerOverLimit <= 0) return 0; + return costType.costAmount * kilometerOverLimit; +} + +export function calculateFahrzeugzuschlag( + tour: Tour, + costType: CostType, +): number { + const isCarNameSupported = !costType.excludeCarNames.includes(tour.carName); + if (!isCarNameSupported) return 0; + return costType.costAmount; +} + +export function calculateWochenendzuschlag( + tour: Tour, + costType: CostType, +): number { + if (isWeekend(toZonedTime(tour.startDate, 'Europe/Berlin'))) + return costType.costAmount; + return 0; +} diff --git a/service/data-hub/data-connector/src/modules/feat-calculation/feat-calculation.module.ts b/service/data-hub/data-connector/src/modules/feat-calculation/feat-calculation.module.ts index 4d5434d..d0da916 100644 --- a/service/data-hub/data-connector/src/modules/feat-calculation/feat-calculation.module.ts +++ b/service/data-hub/data-connector/src/modules/feat-calculation/feat-calculation.module.ts @@ -9,4 +9,4 @@ import { PersonnelCostCalculationService } from './personnel-cost-calculation.se providers: [CalculationService, PersonnelCostCalculationService], exports: [CalculationService], }) -export class FeatureCalculationModule {} +export class FeatCalculationModule {} diff --git a/service/data-hub/data-connector/src/modules/feat-etl/feat-loaders/loaders/tour.loader.ts b/service/data-hub/data-connector/src/modules/feat-etl/feat-loaders/loaders/tour.loader.ts index 6eb94a5..24bddd3 100644 --- a/service/data-hub/data-connector/src/modules/feat-etl/feat-loaders/loaders/tour.loader.ts +++ b/service/data-hub/data-connector/src/modules/feat-etl/feat-loaders/loaders/tour.loader.ts @@ -46,6 +46,7 @@ export class TourLoader { private static tourStagingToFinal(tour: TourStaging, ticketId?: string) { const { + id, done, direction, carName, @@ -96,6 +97,7 @@ export class TourLoader { } = tour; return { + id, done, direction, carName, diff --git a/service/data-hub/data-connector/src/modules/feat-etl/feat-transformers/data-access-transformers.module.ts b/service/data-hub/data-connector/src/modules/feat-etl/feat-transformers/data-access-transformers.module.ts index ee5e5ee..f8ef111 100644 --- a/service/data-hub/data-connector/src/modules/feat-etl/feat-transformers/data-access-transformers.module.ts +++ b/service/data-hub/data-connector/src/modules/feat-etl/feat-transformers/data-access-transformers.module.ts @@ -1,13 +1,13 @@ import { Module } from '@nestjs/common'; import { PrismaModule } from 'src/core/database/prisma.module'; -import { FeatureCalculationModule } from 'src/modules/feat-calculation/feat-calculation.module'; +import { FeatCalculationModule } from 'src/modules/feat-calculation/feat-calculation.module'; import { DataAccessExtractorsModule } from '../feat-extractors/data-access-extractors.module'; import { ToursCalculationAdapater } from './adapter/tours-calculation.adapter'; import { StagingRepository } from './staging.repository'; import { TransformersService } from './transformers.service'; @Module({ - imports: [PrismaModule, DataAccessExtractorsModule, FeatureCalculationModule], + imports: [PrismaModule, DataAccessExtractorsModule, FeatCalculationModule], providers: [TransformersService, StagingRepository, ToursCalculationAdapater], exports: [TransformersService], }) diff --git a/service/data-hub/data-connector/src/modules/feat-etl/feat-transformers/transformers/patient.transformer.ts b/service/data-hub/data-connector/src/modules/feat-etl/feat-transformers/transformers/patient.transformer.ts index 6e7b885..0aeb6fb 100644 --- a/service/data-hub/data-connector/src/modules/feat-etl/feat-transformers/transformers/patient.transformer.ts +++ b/service/data-hub/data-connector/src/modules/feat-etl/feat-transformers/transformers/patient.transformer.ts @@ -12,9 +12,9 @@ export class PatientTransformer { public static transform(patientSource: PatientSource): PatientPreStaging { const patientParsed = { ...patientSource, - surname: faker.person.lastName(), - name: faker.person.firstName(), - street: faker.location.streetAddress(), + // surname: faker.person.lastName(), + // name: faker.person.firstName(), + // street: faker.location.streetAddress(), ...transformProperties(parseDateTime('yyyy-MM-dd'))( pick(['birthday'])(patientSource), ), diff --git a/service/data-hub/data-connector/src/modules/feat-etl/feat-transformers/transformers/planned-time.transformer.ts b/service/data-hub/data-connector/src/modules/feat-etl/feat-transformers/transformers/planned-time.transformer.ts index e8c3300..ee25a62 100644 --- a/service/data-hub/data-connector/src/modules/feat-etl/feat-transformers/transformers/planned-time.transformer.ts +++ b/service/data-hub/data-connector/src/modules/feat-etl/feat-transformers/transformers/planned-time.transformer.ts @@ -15,8 +15,8 @@ export class PlannedTimeTransformer { ): PlannedTimePreStaging { const plannedTimeParsed = { ...plannedTimeSource, - firstname: faker.person.firstName(), - surname: faker.person.lastName(), + // firstname: faker.person.firstName(), + // surname: faker.person.lastName(), ...transformProperties(parseInteger)( pick(['id', 'user_id'])(plannedTimeSource), ), diff --git a/service/data-hub/data-connector/src/modules/feat-etl/feat-transformers/transformers/tour.transformer.ts b/service/data-hub/data-connector/src/modules/feat-etl/feat-transformers/transformers/tour.transformer.ts index 2b2e879..209a411 100644 --- a/service/data-hub/data-connector/src/modules/feat-etl/feat-transformers/transformers/tour.transformer.ts +++ b/service/data-hub/data-connector/src/modules/feat-etl/feat-transformers/transformers/tour.transformer.ts @@ -16,16 +16,16 @@ export class TourTransformer { public static transform(tourSource: TourSource): TourPreStaging { const tourParsed = { ...tourSource, - operationId: faker.number.int({ min: 10000, max: 19999 }), - driverName: faker.person.fullName(), - codriverName: faker.person.fullName(), - patientName: faker.person.firstName(), - patientSurname: faker.person.lastName(), - patientStreet: faker.location.streetAddress(), - startInstitution: faker.company.name(), - startStreet: faker.location.streetAddress(), - targetInstitution: faker.company.name(), - targetStreet: faker.location.streetAddress(), + // operationId: faker.number.int({ min: 10000, max: 19999 }), + // driverName: faker.person.fullName(), + // codriverName: faker.person.fullName(), + // patientName: faker.person.firstName(), + // patientSurname: faker.person.lastName(), + // patientStreet: faker.location.streetAddress(), + // startInstitution: faker.company.name(), + // startStreet: faker.location.streetAddress(), + // targetInstitution: faker.company.name(), + // targetStreet: faker.location.streetAddress(), ...transformProperties(parseInteger)(pick(['check'])(tourSource)), ...transformProperties(parseFloat)( pick(['besetztKm', 'gesamtPreis'])(tourSource), diff --git a/service/data-hub/data-connector/src/modules/feat-etl/feat-transformers/transformers/work-time.transformer.ts b/service/data-hub/data-connector/src/modules/feat-etl/feat-transformers/transformers/work-time.transformer.ts index 89806a3..1ae4761 100644 --- a/service/data-hub/data-connector/src/modules/feat-etl/feat-transformers/transformers/work-time.transformer.ts +++ b/service/data-hub/data-connector/src/modules/feat-etl/feat-transformers/transformers/work-time.transformer.ts @@ -12,8 +12,8 @@ export class WorkTimeTransformer { public static transform(workTimeSource: WorkTimeSource): WorkTimePreStaging { const workTimeParsed = { ...workTimeSource, - firstname: faker.person.firstName(), - surname: faker.person.lastName(), + // firstname: faker.person.firstName(), + // surname: faker.person.lastName(), ...transformProperties(parseInteger)( pick(['id', 'user_id'])(workTimeSource), ), diff --git a/service/data-hub/data-connector/src/modules/feat-kpis/feat-kpis.module.ts b/service/data-hub/data-connector/src/modules/feat-kpis/feat-kpis.module.ts new file mode 100644 index 0000000..75dd933 --- /dev/null +++ b/service/data-hub/data-connector/src/modules/feat-kpis/feat-kpis.module.ts @@ -0,0 +1,13 @@ +import { Module } from '@nestjs/common'; +import { PrismaModule } from 'src/core/database/prisma.module'; +import { FeatBusinessObjectsModule } from '../feat-business-objects/feat-business-objects.module'; +import { FeatCalculationModule } from '../feat-calculation/feat-calculation.module'; +import { KpiResolver } from './kpi.resolver'; +import { KpiService } from './kpi.service'; + +@Module({ + imports: [PrismaModule, FeatBusinessObjectsModule, FeatCalculationModule], + providers: [KpiService, KpiResolver], + exports: [KpiService], +}) +export class FeatKpiModule {} diff --git a/service/data-hub/data-connector/src/modules/feat-kpis/kpi.resolver.ts b/service/data-hub/data-connector/src/modules/feat-kpis/kpi.resolver.ts new file mode 100644 index 0000000..95a9c70 --- /dev/null +++ b/service/data-hub/data-connector/src/modules/feat-kpis/kpi.resolver.ts @@ -0,0 +1,24 @@ +import { Args, Query, Resolver } from '@nestjs/graphql'; +import { TicketValidationState } from '@prisma/client'; +import { KpiService } from './kpi.service'; +import { KpiInfoObjectType } from './object-types'; + +@Resolver() +export class KpiResolver { + constructor(private readonly kpiService: KpiService) {} + + @Query(() => KpiInfoObjectType) + ticketStateKpi( + @Args('state', { type: () => TicketValidationState }) + ticketState: TicketValidationState, + ) { + return this.kpiService.ticketStateKpi(ticketState); + } + + @Query(() => KpiInfoObjectType) + managerKpi( + @Args('ordinanceType', { type: () => String }) ordinanceType: string, + ) { + return this.kpiService.managerKpi(ordinanceType); + } +} diff --git a/service/data-hub/data-connector/src/modules/feat-kpis/kpi.service.ts b/service/data-hub/data-connector/src/modules/feat-kpis/kpi.service.ts new file mode 100644 index 0000000..5009a55 --- /dev/null +++ b/service/data-hub/data-connector/src/modules/feat-kpis/kpi.service.ts @@ -0,0 +1,384 @@ +import { Injectable } from '@nestjs/common'; +import { + ApprovalState, + Prisma, + TicketValidationState, + Tour, +} from '@prisma/client'; +import { + add, + differenceInHours, + differenceInMinutes, + set, + subDays, + subHours, + subMonths, +} from 'date-fns'; +import { PrismaService } from 'src/core/database/prisma.service'; +import { generateIntervalForTimeRange } from 'src/utils'; +import { CarEntityService } from '../feat-business-objects/car-entity/car-entity.service'; +import { CalculationService } from '../feat-calculation/calculation.service'; +import { KpiInfoObjectType, MetricObjectType } from './object-types'; + +function ticketWithCurrentStateAndTours( + ticketState: TicketValidationState, +): Prisma.TicketWhereInput { + return { currentState: ticketState, tours: { some: { check: 0 } } }; +} + +function dateFromTime(timeString: string): Date { + const [hours, minutes] = timeString.split(':'); + return set(new Date(), { + hours: parseInt(hours), + minutes: parseInt(minutes), + seconds: 0, + milliseconds: 0, + }); +} + +@Injectable() +export class KpiService { + constructor( + private readonly prisma: PrismaService, + private readonly carEntity: CarEntityService, + private readonly calculationService: CalculationService, + ) {} + + async calcCityTourAvgTime(ordinanceType: string) { + const tourTimestamps = await this.prisma.tour.findMany({ + select: { + startBegin: true, + startEnd: true, + target: true, + targetBegin: true, + empty: true, + }, + where: { + ...(ordinanceType !== 'ALL' + ? { + ordinanceType: { + contains: ordinanceType, + }, + } + : {}), + done: true, + totalKm: { + lte: 17, + }, + }, + take: 5000, + }); + const tourTimes = tourTimestamps + .filter((timings) => Object.values(timings).filter(Boolean).length > 0) + .map((timings) => { + const times = Object.values(timings).filter(Boolean).sort(); + const startTime = times.at(0); + const endTime = times.at(-1); + return differenceInMinutes( + dateFromTime(endTime), + dateFromTime(startTime), + ); + }); + return tourTimes.reduce((sum, cur) => (sum += cur), 0) / tourTimes.length; + } + + async calcCityTourAvgRevenue(ordinanceType: string) { + const tourRevenues = await this.prisma.tour.findMany({ + select: { + revenue: true, + }, + where: { + ...(ordinanceType !== 'ALL' + ? { + ordinanceType: { + contains: ordinanceType, + }, + } + : {}), + done: true, + totalKm: { + lte: 17, + }, + }, + take: 5000, + }); + return ( + tourRevenues.reduce((sum, { revenue }) => (sum += revenue), 0) / + tourRevenues.length + ); + } + + upcomingTours(): Promise { + const now = new Date(); + const endUpcoming = add(now, { minutes: 20 }); + return this.prisma.tour.findMany({ + where: { + AND: [ + { + startDate: { + gte: subHours(now, 4), + }, + }, + { + startDate: { + lt: endUpcoming, + }, + }, + { + startBegin: null, + }, + { + OR: [ + { + carName: null, + }, + { + AND: [ + { + carName: { + not: 'Storno', + }, + }, + { + carName: { + not: 'Löschen', + }, + }, + { + carName: { + not: 'Abgabe', + }, + }, + ], + }, + ], + }, + { + AND: [ + { + patientId: { + // Pause + not: 'b7424477-a4b2-42f7-b7e7-a4bef24f6979', + }, + }, + { + patientId: { + // Feierabend + not: '3554e1a9-9c07-45e5-b53c-692a77e4fa9a', + }, + }, + ], + }, + { + deletedAt: null, + }, + ], + }, + }); + } + + async managerKpi(ordinanceType: string): Promise { + const avgRevenueCityTour = await this.calcCityTourAvgRevenue(ordinanceType); + const avgCityTourTimeInMinutes = + await this.calcCityTourAvgTime(ordinanceType); + const forDay = subDays(new Date(), 0); + const cars = await this.carEntity.getCarsForOperationDay( + forDay, + ordinanceType, + ); + const workdayInterval = generateIntervalForTimeRange( + '05:00-04:59', + 'Europe/Berlin', + forDay, + ); + + // console.log(cars.map(car => )) + + const workCapacity = cars + .map((car) => car.availableTimeInInterval(workdayInterval)) + .reduce((sum, cur) => (sum += cur), 0); + + const tourAmount = cars + .map((car) => car.tourAmountInInterval(workdayInterval)) + .reduce((sum, cur) => (sum += cur), 0); + + const possibleRevenue = + ((workCapacity * 60) / avgCityTourTimeInMinutes) * avgRevenueCityTour; + const carRevenues = await Promise.all([ + ...cars.map((car) => + car.breakEvenInInterval(workdayInterval, this.calculationService), + ), + ]); + const totalRevenue = carRevenues.reduce( + (sum, { toursRevenue }) => (sum += toursRevenue), + 0, + ); + + return { + main: { + label: 'Realisierbarer Umsatz', + value: Math.floor( + (100 / (possibleRevenue == 0 ? 1 : possibleRevenue)) * totalRevenue, + ), + }, + secondary: { + label: 'Realisierbare Touren', + value: + possibleRevenue > totalRevenue + ? (possibleRevenue - totalRevenue) / avgRevenueCityTour + : 0, + }, + additional: [ + { + label: 'Anzahl Touren', + value: tourAmount, + }, + { + label: 'Kapazität (in h)', + value: workCapacity, + }, + { + label: '⌀ Zeit Stadttour (in min)', + value: avgCityTourTimeInMinutes, + }, + { + label: '⌀ Umsatz Stadttour', + value: avgRevenueCityTour, + }, + ], + }; + } + + async ticketStateKpi( + ticketState: TicketValidationState, + ): Promise { + return { + main: await this.fastMovingTicketPercentMetric(ticketState), + secondary: await this.averageTimePerStateMetric(ticketState), + additional: [ + await this.ticketCountPerStateMetric(ticketState), + ...(ticketState === TicketValidationState.USER_INTERACTION_REQUIRED + ? [await this.ticketApprovalRequiredCountMetric(ticketState)] + : []), + await this.tourCountPerTicketStateMetric(ticketState), + ], + }; + } + + private async fastMovingTicketPercentMetric( + ticketState: TicketValidationState, + ): Promise { + const ticketsGotState24HoursAgo = await this.prisma.ticket.findMany({ + where: { + state: { + some: { + state: ticketState, + createdAt: { + gte: subHours(new Date(), 24), + }, + }, + }, + }, + }); + + const ticketsMoved = ticketsGotState24HoursAgo.filter( + ({ currentState }) => currentState !== ticketState, + ); + + return { + label: 'Neue Tickets bearbeitet innerhalb von 24 Stunden', + value: + ticketsMoved.length === 0 + ? 0 + : Math.floor( + (100 / ticketsGotState24HoursAgo.length) * ticketsMoved.length, + ), + }; + } + + private async averageTimePerStateMetric( + ticketState: TicketValidationState, + ): Promise { + const movedTickets = await this.prisma.ticket.findMany({ + where: { + currentState: { + not: ticketState, + }, + state: { + some: { + state: ticketState, + }, + }, + createdAt: { + gte: subMonths(new Date(), 3), + }, + }, + include: { + state: true, + }, + }); + const timePerTickets = movedTickets + .map(({ state }) => { + const statesSorted = [...state].sort( + (a, b) => + new Date(a.createdAt).getTime() - new Date(b.createdAt).getTime(), + ); + const currentStateIdx = statesSorted.findIndex( + (s) => s.state === ticketState, + ); + if (currentStateIdx === -1) return; + // if (statesSorted.length - 1 === currentStateIdx) return; + return differenceInHours( + new Date(statesSorted.at(currentStateIdx + 1).createdAt), + new Date(statesSorted.at(currentStateIdx).createdAt), + ); + }) + .filter((v) => !!v); + if (timePerTickets.length === 0) { + return { label: '⌀ Verweildauer (in h)', value: 0 }; + } + return { + label: '⌀ Verweildauer (in h)', + value: + timePerTickets.reduce((sum, cur) => (sum += cur), 0) / + timePerTickets.length, + }; + } + + private async ticketCountPerStateMetric( + ticketState: TicketValidationState, + ): Promise { + const count = await this.prisma.ticket.count({ + where: { ...ticketWithCurrentStateAndTours(ticketState) }, + }); + return { label: 'Tickets', value: count }; + } + + private async ticketApprovalRequiredCountMetric( + ticketState: TicketValidationState, + ): Promise { + const count = await this.prisma.ticket.count({ + where: { + ...ticketWithCurrentStateAndTours(ticketState), + approvalState: ApprovalState.REQUIRED, + }, + }); + return { label: 'Genehmigungspflicht', value: count }; + } + + private async tourCountPerTicketStateMetric( + ticketState: TicketValidationState, + ): Promise { + const count = await this.prisma.tour.count({ + where: { + Ticket: { + ...ticketWithCurrentStateAndTours(ticketState), + }, + }, + }); + return { + label: 'Touren', + value: count, + }; + } +} diff --git a/service/data-hub/data-connector/src/modules/feat-kpis/object-types.ts b/service/data-hub/data-connector/src/modules/feat-kpis/object-types.ts new file mode 100644 index 0000000..3c40341 --- /dev/null +++ b/service/data-hub/data-connector/src/modules/feat-kpis/object-types.ts @@ -0,0 +1,19 @@ +import { Field, Float, ObjectType } from '@nestjs/graphql'; + +@ObjectType('Metric') +export class MetricObjectType { + @Field() + label: string; + @Field(() => Float) + value: number; +} + +@ObjectType('KpiInfo') +export class KpiInfoObjectType { + @Field(() => MetricObjectType) + main: MetricObjectType; + @Field(() => MetricObjectType) + secondary: MetricObjectType; + @Field(() => [MetricObjectType]) + additional: MetricObjectType[]; +} diff --git a/service/data-hub/data-connector/src/modules/feat-tickets/ticket-lifecycle.service.ts b/service/data-hub/data-connector/src/modules/feat-tickets/ticket-lifecycle.service.ts index b192513..ea22d05 100644 --- a/service/data-hub/data-connector/src/modules/feat-tickets/ticket-lifecycle.service.ts +++ b/service/data-hub/data-connector/src/modules/feat-tickets/ticket-lifecycle.service.ts @@ -5,6 +5,8 @@ import { TicketValidationState, Tour, } from '@prisma/client'; +import { Interval } from 'date-fns'; +import { DocumentInfoArgs } from './ticket-arg.types'; import { ValidationResult, validatePatient, @@ -12,8 +14,6 @@ import { validateTour, } from './ticket-validation.functions'; import { TicketRepository } from './ticket.repository'; -import { DocumentInfoArgs } from './ticket-arg.types'; -import { Interval } from 'date-fns'; @Injectable() export class TicketLifecycleService { @@ -118,12 +118,28 @@ export class TicketLifecycleService { : ApprovalState.REQUIRED, }); } else { - await this.repository.updateTicket(ticket.id, { - errors, - notes, - state: TicketValidationState.USER_INTERACTION_REQUIRED, - approvalState: ApprovalState.FREE, - }); + // NOTE: Condition required to get these tickets out of USER_INTERACTION_REQUIRED + if ( + ticket.tours.every( + ({ ordinanceType }) => + ordinanceType.indexOf('BTW') > -1 || + ordinanceType.indexOf('TSW') > -1, + ) + ) { + await this.repository.updateTicket(ticket.id, { + errors, + notes, + state: TicketValidationState.TD_UNCERTAIN, + approvalState: ApprovalState.FREE, + }); + } else { + await this.repository.updateTicket(ticket.id, { + errors, + notes, + state: TicketValidationState.USER_INTERACTION_REQUIRED, + approvalState: ApprovalState.FREE, + }); + } } } else { await this.repository.setActionablesOnTicket(ticket.id, errors, notes); @@ -210,6 +226,14 @@ export class TicketLifecycleService { } private async checkTourApprovalRequirement(tour: Tour): Promise { + // NOTE: Requirement by Avicenna + if ( + tour.ordinanceType.indexOf('BTW') > -1 || + tour.ordinanceType.indexOf('TSW') > -1 + ) { + return false; + } + if ( [ 'Einweisung', diff --git a/service/data-hub/data-connector/src/modules/feat-tickets/ticket-validation.functions.ts b/service/data-hub/data-connector/src/modules/feat-tickets/ticket-validation.functions.ts index 7258667..87705fe 100644 --- a/service/data-hub/data-connector/src/modules/feat-tickets/ticket-validation.functions.ts +++ b/service/data-hub/data-connector/src/modules/feat-tickets/ticket-validation.functions.ts @@ -27,15 +27,15 @@ export function validatePatient(patient: Patient): ValidationResult { isValid = false; errors.push('Patient: Krankenkasse ist nicht gefüllt'); } - if (!patient?.careDegree) { - notes.push('Patient: Pflegegrad ist nicht gefüllt'); - } - if (!patient?.disabilityMark1) { - notes.push('Patient: Merkzeichen 1 ist nicht gefüllt'); - } - if (!patient?.disabilityMark2) { - notes.push('Patient: Merkzeichen 2 ist nicht gefüllt'); - } + // if (!patient?.careDegree) { + // notes.push('Patient: Pflegegrad ist nicht gefüllt'); + // } + // if (!patient?.disabilityMark1) { + // notes.push('Patient: Merkzeichen 1 ist nicht gefüllt'); + // } + // if (!patient?.disabilityMark2) { + // notes.push('Patient: Merkzeichen 2 ist nicht gefüllt'); + // } return { result: isValid, diff --git a/service/data-hub/data-connector/src/tracer.ts b/service/data-hub/data-connector/src/tracer.ts new file mode 100644 index 0000000..5c66c73 --- /dev/null +++ b/service/data-hub/data-connector/src/tracer.ts @@ -0,0 +1,40 @@ +'use strict'; + +import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node'; +import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http'; +import { resourceFromAttributes } from '@opentelemetry/resources'; +import * as opentelemetry from '@opentelemetry/sdk-node'; +import { + ATTR_SERVICE_NAME, + ATTR_SERVICE_VERSION, +} from '@opentelemetry/semantic-conventions'; + +// Configure the SDK to export telemetry data to the console +// Enable all auto-instrumentations from the meta package +const exporterOptions = { + url: process.env.TRACE_EXPORTER_URL ?? 'http://localhost:4318/v1/traces', +}; + +const traceExporter = new OTLPTraceExporter(exporterOptions); +const sdk = new opentelemetry.NodeSDK({ + traceExporter, + instrumentations: [getNodeAutoInstrumentations()], + resource: resourceFromAttributes({ + [ATTR_SERVICE_NAME]: process.env.OTLP_SERVICE_NAME ?? 'avicenna.data-connector', + // [ATTR_SERVICE_NAMESPACE]: 'avicenna', + [ATTR_SERVICE_VERSION]: '1.0', + }), +}); + +sdk.start(); + +// gracefully shut down the SDK on process exit +process.on('SIGTERM', () => { + sdk + .shutdown() + .then(() => console.log('Tracing terminated')) + .catch((error) => console.log('Error terminating tracing', error)) + .finally(() => process.exit(0)); +}); + +export default sdk;