diff --git a/apps/api/.env.example b/apps/api/.env.example index f10135c..3966e62 100644 --- a/apps/api/.env.example +++ b/apps/api/.env.example @@ -12,7 +12,7 @@ STELLAR_HORIZON_URL=https://horizon-testnet.stellar.org TREASURY_WALLET_ADDRESS=GDTREASURYADDRESSXXXXXX SUPPORTED_ASSETS=USDC,ARS -# Database (for when implemented) +# Database DATABASE_URL=postgresql://user:password@localhost:5432/stellar_pay # Redis (for when implemented) diff --git a/apps/api/package.json b/apps/api/package.json index 578eccd..6663b0b 100644 --- a/apps/api/package.json +++ b/apps/api/package.json @@ -17,7 +17,9 @@ "test:watch": "jest --watch", "test:cov": "jest --coverage", "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand", - "test:e2e": "jest --config ./test/jest-e2e.json" + "test:e2e": "jest --config ./test/jest-e2e.json", + "prisma:generate": "prisma generate", + "prisma:migrate": "prisma migrate deploy" }, "dependencies": { "@nestjs/common": "^11.0.1", @@ -26,6 +28,7 @@ "@nestjs/platform-express": "^11.0.1", "@nestjs/terminus": "^11.1.1", "@nestjs/throttler": "^6.5.0", + "@prisma/client": "^6.7.0", "@stellar/stellar-sdk": "^14.6.1", "passport": "^0.7.0", "passport-jwt": "^4.0.1", @@ -57,6 +60,7 @@ "jest": "^30.0.0", "jsonwebtoken": "^9.0.3", "prettier": "^3.4.2", + "prisma": "^6.7.0", "source-map-support": "^0.5.21", "supertest": "^7.0.0", "ts-jest": "^29.2.5", diff --git a/apps/api/prisma/migrations/20260325000000_init_core_schema/migration.sql b/apps/api/prisma/migrations/20260325000000_init_core_schema/migration.sql new file mode 100644 index 0000000..6683463 --- /dev/null +++ b/apps/api/prisma/migrations/20260325000000_init_core_schema/migration.sql @@ -0,0 +1,66 @@ +-- CreateEnum +CREATE TYPE "KycStatus" AS ENUM ('pending', 'approved', 'rejected'); + +-- CreateEnum +CREATE TYPE "PaymentIntentStatus" AS ENUM ('pending', 'detected', 'confirmed', 'failed'); + +-- CreateTable +CREATE TABLE "merchants" ( + "id" UUID NOT NULL, + "email" TEXT NOT NULL, + "password_hash" TEXT NOT NULL, + "kyc_status" "KycStatus" NOT NULL DEFAULT 'pending', + "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updated_at" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "merchants_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "payment_intents" ( + "id" UUID NOT NULL, + "merchant_id" UUID NOT NULL, + "amount" DECIMAL(20,2) NOT NULL, + "currency" VARCHAR(3) NOT NULL, + "status" "PaymentIntentStatus" NOT NULL DEFAULT 'pending', + "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updated_at" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "payment_intents_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "treasury_assets" ( + "symbol" VARCHAR(16) NOT NULL, + "total_minted" DECIMAL(30,7) NOT NULL DEFAULT 0, + "total_reserved" DECIMAL(30,7) NOT NULL DEFAULT 0, + + CONSTRAINT "treasury_assets_pkey" PRIMARY KEY ("symbol") +); + +-- CreateTable +CREATE TABLE "webhook_endpoints" ( + "id" UUID NOT NULL, + "merchant_id" UUID NOT NULL, + "url" TEXT NOT NULL, + "secret" TEXT NOT NULL, + "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updated_at" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "webhook_endpoints_pkey" PRIMARY KEY ("id") +); + +-- CreateIndex +CREATE UNIQUE INDEX "merchants_email_key" ON "merchants"("email"); + +-- CreateIndex +CREATE INDEX "payment_intents_merchant_id_idx" ON "payment_intents"("merchant_id"); + +-- CreateIndex +CREATE INDEX "webhook_endpoints_merchant_id_idx" ON "webhook_endpoints"("merchant_id"); + +-- AddForeignKey +ALTER TABLE "payment_intents" ADD CONSTRAINT "payment_intents_merchant_id_fkey" FOREIGN KEY ("merchant_id") REFERENCES "merchants"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "webhook_endpoints" ADD CONSTRAINT "webhook_endpoints_merchant_id_fkey" FOREIGN KEY ("merchant_id") REFERENCES "merchants"("id") ON DELETE CASCADE ON UPDATE CASCADE; diff --git a/apps/api/prisma/migrations/migration_lock.toml b/apps/api/prisma/migrations/migration_lock.toml new file mode 100644 index 0000000..1eed3a5 --- /dev/null +++ b/apps/api/prisma/migrations/migration_lock.toml @@ -0,0 +1,2 @@ +# Please do not edit this file manually +provider = "postgresql" diff --git a/apps/api/prisma/schema.prisma b/apps/api/prisma/schema.prisma new file mode 100644 index 0000000..7a0a1a9 --- /dev/null +++ b/apps/api/prisma/schema.prisma @@ -0,0 +1,69 @@ +generator client { + provider = "prisma-client-js" +} + +datasource db { + provider = "postgresql" + url = env("DATABASE_URL") +} + +enum KycStatus { + PENDING @map("pending") + APPROVED @map("approved") + REJECTED @map("rejected") +} + +enum PaymentIntentStatus { + PENDING @map("pending") + DETECTED @map("detected") + CONFIRMED @map("confirmed") + FAILED @map("failed") +} + +model Merchant { + id String @id @default(uuid()) @db.Uuid + email String @unique + passwordHash String @map("password_hash") + kycStatus KycStatus @default(PENDING) @map("kyc_status") + paymentIntents PaymentIntent[] + webhookEndpoints WebhookEndpoint[] + createdAt DateTime @default(now()) @map("created_at") + updatedAt DateTime @updatedAt @map("updated_at") + + @@map("merchants") +} + +model PaymentIntent { + id String @id @default(uuid()) @db.Uuid + merchantId String @map("merchant_id") @db.Uuid + merchant Merchant @relation(fields: [merchantId], references: [id], onDelete: Cascade) + amount Decimal @db.Decimal(20, 2) + currency String @db.VarChar(3) + status PaymentIntentStatus @default(PENDING) + createdAt DateTime @default(now()) @map("created_at") + updatedAt DateTime @updatedAt @map("updated_at") + + @@index([merchantId]) + @@map("payment_intents") +} + +model TreasuryAsset { + symbol String @id @db.VarChar(16) + totalMinted Decimal @default(0) @map("total_minted") @db.Decimal(30, 7) + totalReserved Decimal @default(0) @map("total_reserved") @db.Decimal(30, 7) + + @@map("treasury_assets") +} + +model WebhookEndpoint { + id String @id @default(uuid()) @db.Uuid + merchantId String @map("merchant_id") @db.Uuid + merchant Merchant @relation(fields: [merchantId], references: [id], onDelete: Cascade) + url String + secret String + createdAt DateTime @default(now()) @map("created_at") + updatedAt DateTime @updatedAt @map("updated_at") + + @@index([merchantId]) + @@map("webhook_endpoints") +} diff --git a/apps/api/src/app.module.ts b/apps/api/src/app.module.ts index 2fa7293..c600c21 100644 --- a/apps/api/src/app.module.ts +++ b/apps/api/src/app.module.ts @@ -3,6 +3,7 @@ import { APP_GUARD } from '@nestjs/core'; import { ThrottlerModule } from '@nestjs/throttler'; import { AppController } from './app.controller'; import { AppService } from './app.service'; +import { PrismaModule } from './prisma/prisma.module'; import { HealthModule } from './health/health.module'; import { TreasuryModule } from './treasury/treasury.module'; import { AuthModule } from './auth/auth.module'; @@ -12,6 +13,7 @@ import { WorkerModule } from './modules/worker/worker.module'; @Module({ imports: [ + PrismaModule, HealthModule, TreasuryModule, AuthModule, diff --git a/apps/api/src/prisma/prisma.module.ts b/apps/api/src/prisma/prisma.module.ts new file mode 100644 index 0000000..7207426 --- /dev/null +++ b/apps/api/src/prisma/prisma.module.ts @@ -0,0 +1,9 @@ +import { Global, Module } from '@nestjs/common'; +import { PrismaService } from './prisma.service'; + +@Global() +@Module({ + providers: [PrismaService], + exports: [PrismaService], +}) +export class PrismaModule {} diff --git a/apps/api/src/prisma/prisma.service.ts b/apps/api/src/prisma/prisma.service.ts new file mode 100644 index 0000000..623d5e0 --- /dev/null +++ b/apps/api/src/prisma/prisma.service.ts @@ -0,0 +1,13 @@ +import { Injectable, OnModuleDestroy, OnModuleInit } from '@nestjs/common'; +import { PrismaClient } from '@prisma/client'; + +@Injectable() +export class PrismaService extends PrismaClient implements OnModuleInit, OnModuleDestroy { + async onModuleInit() { + await this.$connect(); + } + + async onModuleDestroy() { + await this.$disconnect(); + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4159bdb..0f22374 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -103,10 +103,13 @@ importers: version: 11.2.6(@nestjs/common@11.1.14(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.14)(reflect-metadata@0.2.2) '@nestjs/terminus': specifier: ^11.1.1 - version: 11.1.1(@nestjs/common@11.1.14(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.14)(reflect-metadata@0.2.2)(rxjs@7.8.2) + version: 11.1.1(@nestjs/common@11.1.14(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.14)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(reflect-metadata@0.2.2)(rxjs@7.8.2) '@nestjs/throttler': specifier: ^6.5.0 version: 6.5.0(@nestjs/common@11.1.14(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.14)(reflect-metadata@0.2.2) + '@prisma/client': + specifier: ^6.7.0 + version: 6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3) '@stellar-pay/payments-engine': specifier: workspace:* version: link:../../packages/payments-engine @@ -140,7 +143,7 @@ importers: version: 9.39.3 '@nestjs/cli': specifier: ^11.0.0 - version: 11.0.16(@types/node@22.19.13) + version: 11.0.16(@types/node@22.19.13)(esbuild@0.27.4) '@nestjs/schematics': specifier: ^11.0.0 version: 11.0.9(chokidar@4.0.3)(typescript@5.9.3) @@ -182,13 +185,16 @@ importers: version: 16.5.0 jest: specifier: ^30.0.0 - version: 30.2.0(@types/node@22.19.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@22.19.13)(typescript@5.9.3)) + version: 30.2.0(@types/node@22.19.13)(babel-plugin-macros@3.1.0)(esbuild-register@3.6.0(esbuild@0.27.4))(ts-node@10.9.2(@types/node@22.19.13)(typescript@5.9.3)) jsonwebtoken: specifier: ^9.0.3 version: 9.0.3 prettier: specifier: ^3.4.2 version: 3.8.1 + prisma: + specifier: ^6.7.0 + version: 6.7.0(typescript@5.9.3) source-map-support: specifier: ^0.5.21 version: 0.5.21 @@ -197,10 +203,10 @@ importers: version: 7.2.2 ts-jest: specifier: ^29.2.5 - version: 29.4.6(@babel/core@7.29.0)(@jest/transform@30.2.0)(@jest/types@30.2.0)(babel-jest@30.2.0(@babel/core@7.29.0))(jest-util@30.2.0)(jest@30.2.0(@types/node@22.19.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@22.19.13)(typescript@5.9.3)))(typescript@5.9.3) + version: 29.4.6(@babel/core@7.29.0)(@jest/transform@30.2.0)(@jest/types@30.2.0)(babel-jest@30.2.0(@babel/core@7.29.0))(esbuild@0.27.4)(jest-util@30.2.0)(jest@30.2.0(@types/node@22.19.13)(babel-plugin-macros@3.1.0)(esbuild-register@3.6.0(esbuild@0.27.4))(ts-node@10.9.2(@types/node@22.19.13)(typescript@5.9.3)))(typescript@5.9.3) ts-loader: specifier: ^9.5.2 - version: 9.5.4(typescript@5.9.3)(webpack@5.104.1) + version: 9.5.4(typescript@5.9.3)(webpack@5.104.1(esbuild@0.27.4)) ts-node: specifier: ^10.9.2 version: 10.9.2(@types/node@22.19.13)(typescript@5.9.3) @@ -1474,6 +1480,7 @@ packages: } cpu: [arm64] os: [linux] + libc: [glibc] '@img/sharp-libvips-linux-arm@1.2.4': resolution: @@ -1482,6 +1489,7 @@ packages: } cpu: [arm] os: [linux] + libc: [glibc] '@img/sharp-libvips-linux-ppc64@1.2.4': resolution: @@ -1490,6 +1498,7 @@ packages: } cpu: [ppc64] os: [linux] + libc: [glibc] '@img/sharp-libvips-linux-riscv64@1.2.4': resolution: @@ -1498,6 +1507,7 @@ packages: } cpu: [riscv64] os: [linux] + libc: [glibc] '@img/sharp-libvips-linux-s390x@1.2.4': resolution: @@ -1506,6 +1516,7 @@ packages: } cpu: [s390x] os: [linux] + libc: [glibc] '@img/sharp-libvips-linux-x64@1.2.4': resolution: @@ -1514,6 +1525,7 @@ packages: } cpu: [x64] os: [linux] + libc: [glibc] '@img/sharp-libvips-linuxmusl-arm64@1.2.4': resolution: @@ -1522,6 +1534,7 @@ packages: } cpu: [arm64] os: [linux] + libc: [musl] '@img/sharp-libvips-linuxmusl-x64@1.2.4': resolution: @@ -1530,6 +1543,7 @@ packages: } cpu: [x64] os: [linux] + libc: [musl] '@img/sharp-linux-arm64@0.34.5': resolution: @@ -1539,6 +1553,7 @@ packages: engines: { node: ^18.17.0 || ^20.3.0 || >=21.0.0 } cpu: [arm64] os: [linux] + libc: [glibc] '@img/sharp-linux-arm@0.34.5': resolution: @@ -1548,6 +1563,7 @@ packages: engines: { node: ^18.17.0 || ^20.3.0 || >=21.0.0 } cpu: [arm] os: [linux] + libc: [glibc] '@img/sharp-linux-ppc64@0.34.5': resolution: @@ -1557,6 +1573,7 @@ packages: engines: { node: ^18.17.0 || ^20.3.0 || >=21.0.0 } cpu: [ppc64] os: [linux] + libc: [glibc] '@img/sharp-linux-riscv64@0.34.5': resolution: @@ -1566,6 +1583,7 @@ packages: engines: { node: ^18.17.0 || ^20.3.0 || >=21.0.0 } cpu: [riscv64] os: [linux] + libc: [glibc] '@img/sharp-linux-s390x@0.34.5': resolution: @@ -1575,6 +1593,7 @@ packages: engines: { node: ^18.17.0 || ^20.3.0 || >=21.0.0 } cpu: [s390x] os: [linux] + libc: [glibc] '@img/sharp-linux-x64@0.34.5': resolution: @@ -1584,6 +1603,7 @@ packages: engines: { node: ^18.17.0 || ^20.3.0 || >=21.0.0 } cpu: [x64] os: [linux] + libc: [glibc] '@img/sharp-linuxmusl-arm64@0.34.5': resolution: @@ -1593,6 +1613,7 @@ packages: engines: { node: ^18.17.0 || ^20.3.0 || >=21.0.0 } cpu: [arm64] os: [linux] + libc: [musl] '@img/sharp-linuxmusl-x64@0.34.5': resolution: @@ -1602,6 +1623,7 @@ packages: engines: { node: ^18.17.0 || ^20.3.0 || >=21.0.0 } cpu: [x64] os: [linux] + libc: [musl] '@img/sharp-wasm32@0.34.5': resolution: @@ -2425,6 +2447,7 @@ packages: engines: { node: '>= 10' } cpu: [arm64] os: [linux] + libc: [glibc] '@next/swc-linux-arm64-musl@16.1.6': resolution: @@ -2434,6 +2457,7 @@ packages: engines: { node: '>= 10' } cpu: [arm64] os: [linux] + libc: [musl] '@next/swc-linux-x64-gnu@16.1.6': resolution: @@ -2443,6 +2467,7 @@ packages: engines: { node: '>= 10' } cpu: [x64] os: [linux] + libc: [glibc] '@next/swc-linux-x64-musl@16.1.6': resolution: @@ -2452,6 +2477,7 @@ packages: engines: { node: '>= 10' } cpu: [x64] os: [linux] + libc: [musl] '@next/swc-win32-arm64-msvc@16.1.6': resolution: @@ -2572,6 +2598,57 @@ packages: integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==, } + '@prisma/client@6.7.0': + resolution: + { + integrity: sha512-+k61zZn1XHjbZul8q6TdQLpuI/cvyfil87zqK2zpreNIXyXtpUv3+H/oM69hcsFcZXaokHJIzPAt5Z8C8eK2QA==, + } + engines: { node: '>=18.18' } + peerDependencies: + prisma: '*' + typescript: '>=5.1.0' + peerDependenciesMeta: + prisma: + optional: true + typescript: + optional: true + + '@prisma/config@6.7.0': + resolution: + { + integrity: sha512-di8QDdvSz7DLUi3OOcCHSwxRNeW7jtGRUD2+Z3SdNE3A+pPiNT8WgUJoUyOwJmUr5t+JA2W15P78C/N+8RXrOA==, + } + + '@prisma/debug@6.7.0': + resolution: + { + integrity: sha512-RabHn9emKoYFsv99RLxvfG2GHzWk2ZI1BuVzqYtmMSIcuGboHY5uFt3Q3boOREM9de6z5s3bQoyKeWnq8Fz22w==, + } + + '@prisma/engines-version@6.7.0-36.3cff47a7f5d65c3ea74883f1d736e41d68ce91ed': + resolution: + { + integrity: sha512-EvpOFEWf1KkJpDsBCrih0kg3HdHuaCnXmMn7XFPObpFTzagK1N0Q0FMnYPsEhvARfANP5Ok11QyoTIRA2hgJTA==, + } + + '@prisma/engines@6.7.0': + resolution: + { + integrity: sha512-3wDMesnOxPrOsq++e5oKV9LmIiEazFTRFZrlULDQ8fxdub5w4NgRBoxtWbvXmj2nJVCnzuz6eFix3OhIqsZ1jw==, + } + + '@prisma/fetch-engine@6.7.0': + resolution: + { + integrity: sha512-zLlAGnrkmioPKJR4Yf7NfW3hftcvqeNNEHleMZK9yX7RZSkhmxacAYyfGsCcqRt47jiZ7RKdgE0Wh2fWnm7WsQ==, + } + + '@prisma/get-platform@6.7.0': + resolution: + { + integrity: sha512-i9IH5lO4fQwnMLvQLYNdgVh9TK3PuWBfQd7QLk/YurnAIg+VeADcZDbmhAi4XBBDD+hDif9hrKyASu0hbjwabw==, + } + '@radix-ui/number@1.1.0': resolution: { @@ -4293,6 +4370,7 @@ packages: } cpu: [arm] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm-musleabihf@4.60.0': resolution: @@ -4301,6 +4379,7 @@ packages: } cpu: [arm] os: [linux] + libc: [musl] '@rollup/rollup-linux-arm64-gnu@4.60.0': resolution: @@ -4309,6 +4388,7 @@ packages: } cpu: [arm64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm64-musl@4.60.0': resolution: @@ -4317,6 +4397,7 @@ packages: } cpu: [arm64] os: [linux] + libc: [musl] '@rollup/rollup-linux-loong64-gnu@4.60.0': resolution: @@ -4325,6 +4406,7 @@ packages: } cpu: [loong64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-loong64-musl@4.60.0': resolution: @@ -4333,6 +4415,7 @@ packages: } cpu: [loong64] os: [linux] + libc: [musl] '@rollup/rollup-linux-ppc64-gnu@4.60.0': resolution: @@ -4341,6 +4424,7 @@ packages: } cpu: [ppc64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-ppc64-musl@4.60.0': resolution: @@ -4349,6 +4433,7 @@ packages: } cpu: [ppc64] os: [linux] + libc: [musl] '@rollup/rollup-linux-riscv64-gnu@4.60.0': resolution: @@ -4357,6 +4442,7 @@ packages: } cpu: [riscv64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-riscv64-musl@4.60.0': resolution: @@ -4365,6 +4451,7 @@ packages: } cpu: [riscv64] os: [linux] + libc: [musl] '@rollup/rollup-linux-s390x-gnu@4.60.0': resolution: @@ -4373,6 +4460,7 @@ packages: } cpu: [s390x] os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-gnu@4.60.0': resolution: @@ -4381,6 +4469,7 @@ packages: } cpu: [x64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-musl@4.60.0': resolution: @@ -4389,6 +4478,7 @@ packages: } cpu: [x64] os: [linux] + libc: [musl] '@rollup/rollup-openbsd-x64@4.60.0': resolution: @@ -4574,6 +4664,7 @@ packages: engines: { node: '>= 20' } cpu: [arm64] os: [linux] + libc: [glibc] '@tailwindcss/oxide-linux-arm64-musl@4.2.1': resolution: @@ -4583,6 +4674,7 @@ packages: engines: { node: '>= 20' } cpu: [arm64] os: [linux] + libc: [musl] '@tailwindcss/oxide-linux-x64-gnu@4.2.1': resolution: @@ -4592,6 +4684,7 @@ packages: engines: { node: '>= 20' } cpu: [x64] os: [linux] + libc: [glibc] '@tailwindcss/oxide-linux-x64-musl@4.2.1': resolution: @@ -4601,6 +4694,7 @@ packages: engines: { node: '>= 20' } cpu: [x64] os: [linux] + libc: [musl] '@tailwindcss/oxide-wasm32-wasi@4.2.1': resolution: @@ -5184,6 +5278,7 @@ packages: } cpu: [arm64] os: [linux] + libc: [glibc] '@unrs/resolver-binding-linux-arm64-musl@1.11.1': resolution: @@ -5192,6 +5287,7 @@ packages: } cpu: [arm64] os: [linux] + libc: [musl] '@unrs/resolver-binding-linux-ppc64-gnu@1.11.1': resolution: @@ -5200,6 +5296,7 @@ packages: } cpu: [ppc64] os: [linux] + libc: [glibc] '@unrs/resolver-binding-linux-riscv64-gnu@1.11.1': resolution: @@ -5208,6 +5305,7 @@ packages: } cpu: [riscv64] os: [linux] + libc: [glibc] '@unrs/resolver-binding-linux-riscv64-musl@1.11.1': resolution: @@ -5216,6 +5314,7 @@ packages: } cpu: [riscv64] os: [linux] + libc: [musl] '@unrs/resolver-binding-linux-s390x-gnu@1.11.1': resolution: @@ -5224,6 +5323,7 @@ packages: } cpu: [s390x] os: [linux] + libc: [glibc] '@unrs/resolver-binding-linux-x64-gnu@1.11.1': resolution: @@ -5232,6 +5332,7 @@ packages: } cpu: [x64] os: [linux] + libc: [glibc] '@unrs/resolver-binding-linux-x64-musl@1.11.1': resolution: @@ -5240,6 +5341,7 @@ packages: } cpu: [x64] os: [linux] + libc: [musl] '@unrs/resolver-binding-wasm32-wasi@1.11.1': resolution: @@ -6881,6 +6983,14 @@ packages: } engines: { node: '>= 0.4' } + esbuild-register@3.6.0: + resolution: + { + integrity: sha512-H2/S7Pm8a9CL1uhp9OvjwrBh5Pvx0H8qVOxNu8Wed9Y7qv56MPtq+GGM8RJpq6glYJn9Wspr8uw7l55uyinNeg==, + } + peerDependencies: + esbuild: '>=0.12 <1' + esbuild@0.27.4: resolution: { @@ -8812,6 +8922,7 @@ packages: engines: { node: '>= 12.0.0' } cpu: [arm64] os: [linux] + libc: [glibc] lightningcss-linux-arm64-musl@1.31.1: resolution: @@ -8821,6 +8932,7 @@ packages: engines: { node: '>= 12.0.0' } cpu: [arm64] os: [linux] + libc: [musl] lightningcss-linux-x64-gnu@1.31.1: resolution: @@ -8830,6 +8942,7 @@ packages: engines: { node: '>= 12.0.0' } cpu: [x64] os: [linux] + libc: [glibc] lightningcss-linux-x64-musl@1.31.1: resolution: @@ -8839,6 +8952,7 @@ packages: engines: { node: '>= 12.0.0' } cpu: [x64] os: [linux] + libc: [musl] lightningcss-win32-arm64-msvc@1.31.1: resolution: @@ -9927,6 +10041,19 @@ packages: } engines: { node: '>=18' } + prisma@6.7.0: + resolution: + { + integrity: sha512-vArg+4UqnQ13CVhc2WUosemwh6hr6cr6FY2uzDvCIFwH8pu8BXVv38PktoMLVjtX7sbYThxbnZF5YiR8sN2clw==, + } + engines: { node: '>=18.18' } + hasBin: true + peerDependencies: + typescript: '>=5.1.0' + peerDependenciesMeta: + typescript: + optional: true + prompts@2.4.2: resolution: { @@ -12839,7 +12966,7 @@ snapshots: jest-util: 30.2.0 slash: 3.0.0 - '@jest/core@30.2.0(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@22.19.13)(typescript@5.9.3))': + '@jest/core@30.2.0(babel-plugin-macros@3.1.0)(esbuild-register@3.6.0(esbuild@0.27.4))(ts-node@10.9.2(@types/node@22.19.13)(typescript@5.9.3))': dependencies: '@jest/console': 30.2.0 '@jest/pattern': 30.0.1 @@ -12854,7 +12981,7 @@ snapshots: exit-x: 0.2.2 graceful-fs: 4.2.11 jest-changed-files: 30.2.0 - jest-config: 30.2.0(@types/node@22.19.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@22.19.13)(typescript@5.9.3)) + jest-config: 30.2.0(@types/node@22.19.13)(babel-plugin-macros@3.1.0)(esbuild-register@3.6.0(esbuild@0.27.4))(ts-node@10.9.2(@types/node@22.19.13)(typescript@5.9.3)) jest-haste-map: 30.2.0 jest-message-util: 30.2.0 jest-regex-util: 30.0.1 @@ -13167,7 +13294,7 @@ snapshots: '@tybys/wasm-util': 0.10.1 optional: true - '@nestjs/cli@11.0.16(@types/node@22.19.13)': + '@nestjs/cli@11.0.16(@types/node@22.19.13)(esbuild@0.27.4)': dependencies: '@angular-devkit/core': 19.2.19(chokidar@4.0.3) '@angular-devkit/schematics': 19.2.19(chokidar@4.0.3) @@ -13178,14 +13305,14 @@ snapshots: chokidar: 4.0.3 cli-table3: 0.6.5 commander: 4.1.1 - fork-ts-checker-webpack-plugin: 9.1.0(typescript@5.9.3)(webpack@5.104.1) + fork-ts-checker-webpack-plugin: 9.1.0(typescript@5.9.3)(webpack@5.104.1(esbuild@0.27.4)) glob: 13.0.0 node-emoji: 1.11.0 ora: 5.4.1 tsconfig-paths: 4.2.0 tsconfig-paths-webpack-plugin: 4.2.0 typescript: 5.9.3 - webpack: 5.104.1 + webpack: 5.104.1(esbuild@0.27.4) webpack-node-externals: 3.0.0 transitivePeerDependencies: - '@types/node' @@ -13270,7 +13397,7 @@ snapshots: reflect-metadata: 0.2.2 swagger-ui-dist: 5.31.0 - '@nestjs/terminus@11.1.1(@nestjs/common@11.1.14(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.14)(reflect-metadata@0.2.2)(rxjs@7.8.2)': + '@nestjs/terminus@11.1.1(@nestjs/common@11.1.14(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.14)(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3))(reflect-metadata@0.2.2)(rxjs@7.8.2)': dependencies: '@nestjs/common': 11.1.14(reflect-metadata@0.2.2)(rxjs@7.8.2) '@nestjs/core': 11.1.14(@nestjs/common@11.1.14(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.14)(reflect-metadata@0.2.2)(rxjs@7.8.2) @@ -13278,6 +13405,8 @@ snapshots: check-disk-space: 3.4.0 reflect-metadata: 0.2.2 rxjs: 7.8.2 + optionalDependencies: + '@prisma/client': 6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3) '@nestjs/testing@11.1.14(@nestjs/common@11.1.14(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.14)(@nestjs/platform-express@11.1.14)': dependencies: @@ -13369,6 +13498,39 @@ snapshots: '@popperjs/core@2.11.8': {} + '@prisma/client@6.7.0(prisma@6.7.0(typescript@5.9.3))(typescript@5.9.3)': + optionalDependencies: + prisma: 6.7.0(typescript@5.9.3) + typescript: 5.9.3 + + '@prisma/config@6.7.0': + dependencies: + esbuild: 0.27.4 + esbuild-register: 3.6.0(esbuild@0.27.4) + transitivePeerDependencies: + - supports-color + + '@prisma/debug@6.7.0': {} + + '@prisma/engines-version@6.7.0-36.3cff47a7f5d65c3ea74883f1d736e41d68ce91ed': {} + + '@prisma/engines@6.7.0': + dependencies: + '@prisma/debug': 6.7.0 + '@prisma/engines-version': 6.7.0-36.3cff47a7f5d65c3ea74883f1d736e41d68ce91ed + '@prisma/fetch-engine': 6.7.0 + '@prisma/get-platform': 6.7.0 + + '@prisma/fetch-engine@6.7.0': + dependencies: + '@prisma/debug': 6.7.0 + '@prisma/engines-version': 6.7.0-36.3cff47a7f5d65c3ea74883f1d736e41d68ce91ed + '@prisma/get-platform': 6.7.0 + + '@prisma/get-platform@6.7.0': + dependencies: + '@prisma/debug': 6.7.0 + '@radix-ui/number@1.1.0': {} '@radix-ui/number@1.1.1': {} @@ -16339,6 +16501,13 @@ snapshots: is-date-object: 1.1.0 is-symbol: 1.1.1 + esbuild-register@3.6.0(esbuild@0.27.4): + dependencies: + debug: 4.4.3 + esbuild: 0.27.4 + transitivePeerDependencies: + - supports-color + esbuild@0.27.4: optionalDependencies: '@esbuild/aix-ppc64': 0.27.4 @@ -16382,7 +16551,7 @@ snapshots: eslint: 9.39.3(jiti@2.6.1) eslint-import-resolver-node: 0.3.9 eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.56.1(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.3(jiti@2.6.1)))(eslint@9.39.3(jiti@2.6.1)) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.56.1(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.3(jiti@2.6.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.56.1(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.56.1(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.3(jiti@2.6.1)))(eslint@9.39.3(jiti@2.6.1)))(eslint@9.39.3(jiti@2.6.1)) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.39.3(jiti@2.6.1)) eslint-plugin-react: 7.37.5(eslint@9.39.3(jiti@2.6.1)) eslint-plugin-react-hooks: 7.0.1(eslint@9.39.3(jiti@2.6.1)) @@ -16419,7 +16588,7 @@ snapshots: tinyglobby: 0.2.15 unrs-resolver: 1.11.1 optionalDependencies: - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.56.1(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.3(jiti@2.6.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.56.1(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.56.1(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.3(jiti@2.6.1)))(eslint@9.39.3(jiti@2.6.1)))(eslint@9.39.3(jiti@2.6.1)) transitivePeerDependencies: - supports-color @@ -16434,7 +16603,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.56.1(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.3(jiti@2.6.1)): + eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.56.1(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.56.1(eslint@9.39.3(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.3(jiti@2.6.1)))(eslint@9.39.3(jiti@2.6.1)))(eslint@9.39.3(jiti@2.6.1)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.9 @@ -16815,7 +16984,7 @@ snapshots: cross-spawn: 7.0.6 signal-exit: 4.1.0 - fork-ts-checker-webpack-plugin@9.1.0(typescript@5.9.3)(webpack@5.104.1): + fork-ts-checker-webpack-plugin@9.1.0(typescript@5.9.3)(webpack@5.104.1(esbuild@0.27.4)): dependencies: '@babel/code-frame': 7.29.0 chalk: 4.1.2 @@ -16830,7 +16999,7 @@ snapshots: semver: 7.7.4 tapable: 2.3.0 typescript: 5.9.3 - webpack: 5.104.1 + webpack: 5.104.1(esbuild@0.27.4) form-data@4.0.5: dependencies: @@ -17360,15 +17529,15 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@30.2.0(@types/node@22.19.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@22.19.13)(typescript@5.9.3)): + jest-cli@30.2.0(@types/node@22.19.13)(babel-plugin-macros@3.1.0)(esbuild-register@3.6.0(esbuild@0.27.4))(ts-node@10.9.2(@types/node@22.19.13)(typescript@5.9.3)): dependencies: - '@jest/core': 30.2.0(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@22.19.13)(typescript@5.9.3)) + '@jest/core': 30.2.0(babel-plugin-macros@3.1.0)(esbuild-register@3.6.0(esbuild@0.27.4))(ts-node@10.9.2(@types/node@22.19.13)(typescript@5.9.3)) '@jest/test-result': 30.2.0 '@jest/types': 30.2.0 chalk: 4.1.2 exit-x: 0.2.2 import-local: 3.2.0 - jest-config: 30.2.0(@types/node@22.19.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@22.19.13)(typescript@5.9.3)) + jest-config: 30.2.0(@types/node@22.19.13)(babel-plugin-macros@3.1.0)(esbuild-register@3.6.0(esbuild@0.27.4))(ts-node@10.9.2(@types/node@22.19.13)(typescript@5.9.3)) jest-util: 30.2.0 jest-validate: 30.2.0 yargs: 17.7.2 @@ -17379,7 +17548,7 @@ snapshots: - supports-color - ts-node - jest-config@30.2.0(@types/node@22.19.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@22.19.13)(typescript@5.9.3)): + jest-config@30.2.0(@types/node@22.19.13)(babel-plugin-macros@3.1.0)(esbuild-register@3.6.0(esbuild@0.27.4))(ts-node@10.9.2(@types/node@22.19.13)(typescript@5.9.3)): dependencies: '@babel/core': 7.29.0 '@jest/get-type': 30.1.0 @@ -17407,6 +17576,7 @@ snapshots: strip-json-comments: 3.1.1 optionalDependencies: '@types/node': 22.19.13 + esbuild-register: 3.6.0(esbuild@0.27.4) ts-node: 10.9.2(@types/node@22.19.13)(typescript@5.9.3) transitivePeerDependencies: - babel-plugin-macros @@ -17633,12 +17803,12 @@ snapshots: merge-stream: 2.0.0 supports-color: 8.1.1 - jest@30.2.0(@types/node@22.19.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@22.19.13)(typescript@5.9.3)): + jest@30.2.0(@types/node@22.19.13)(babel-plugin-macros@3.1.0)(esbuild-register@3.6.0(esbuild@0.27.4))(ts-node@10.9.2(@types/node@22.19.13)(typescript@5.9.3)): dependencies: - '@jest/core': 30.2.0(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@22.19.13)(typescript@5.9.3)) + '@jest/core': 30.2.0(babel-plugin-macros@3.1.0)(esbuild-register@3.6.0(esbuild@0.27.4))(ts-node@10.9.2(@types/node@22.19.13)(typescript@5.9.3)) '@jest/types': 30.2.0 import-local: 3.2.0 - jest-cli: 30.2.0(@types/node@22.19.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@22.19.13)(typescript@5.9.3)) + jest-cli: 30.2.0(@types/node@22.19.13)(babel-plugin-macros@3.1.0)(esbuild-register@3.6.0(esbuild@0.27.4))(ts-node@10.9.2(@types/node@22.19.13)(typescript@5.9.3)) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -18379,6 +18549,16 @@ snapshots: dependencies: parse-ms: 4.0.0 + prisma@6.7.0(typescript@5.9.3): + dependencies: + '@prisma/config': 6.7.0 + '@prisma/engines': 6.7.0 + optionalDependencies: + fsevents: 2.3.3 + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + prompts@2.4.2: dependencies: kleur: 3.0.3 @@ -19257,14 +19437,16 @@ snapshots: tapable@2.3.0: {} - terser-webpack-plugin@5.3.16(webpack@5.104.1): + terser-webpack-plugin@5.3.16(esbuild@0.27.4)(webpack@5.104.1(esbuild@0.27.4)): dependencies: '@jridgewell/trace-mapping': 0.3.31 jest-worker: 27.5.1 schema-utils: 4.3.3 serialize-javascript: 6.0.2 terser: 5.46.0 - webpack: 5.104.1 + webpack: 5.104.1(esbuild@0.27.4) + optionalDependencies: + esbuild: 0.27.4 terser@5.46.0: dependencies: @@ -19338,12 +19520,12 @@ snapshots: ts-interface-checker@0.1.13: {} - ts-jest@29.4.6(@babel/core@7.29.0)(@jest/transform@30.2.0)(@jest/types@30.2.0)(babel-jest@30.2.0(@babel/core@7.29.0))(jest-util@30.2.0)(jest@30.2.0(@types/node@22.19.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@22.19.13)(typescript@5.9.3)))(typescript@5.9.3): + ts-jest@29.4.6(@babel/core@7.29.0)(@jest/transform@30.2.0)(@jest/types@30.2.0)(babel-jest@30.2.0(@babel/core@7.29.0))(esbuild@0.27.4)(jest-util@30.2.0)(jest@30.2.0(@types/node@22.19.13)(babel-plugin-macros@3.1.0)(esbuild-register@3.6.0(esbuild@0.27.4))(ts-node@10.9.2(@types/node@22.19.13)(typescript@5.9.3)))(typescript@5.9.3): dependencies: bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 handlebars: 4.7.8 - jest: 30.2.0(@types/node@22.19.13)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@types/node@22.19.13)(typescript@5.9.3)) + jest: 30.2.0(@types/node@22.19.13)(babel-plugin-macros@3.1.0)(esbuild-register@3.6.0(esbuild@0.27.4))(ts-node@10.9.2(@types/node@22.19.13)(typescript@5.9.3)) json5: 2.2.3 lodash.memoize: 4.1.2 make-error: 1.3.6 @@ -19356,9 +19538,10 @@ snapshots: '@jest/transform': 30.2.0 '@jest/types': 30.2.0 babel-jest: 30.2.0(@babel/core@7.29.0) + esbuild: 0.27.4 jest-util: 30.2.0 - ts-loader@9.5.4(typescript@5.9.3)(webpack@5.104.1): + ts-loader@9.5.4(typescript@5.9.3)(webpack@5.104.1(esbuild@0.27.4)): dependencies: chalk: 4.1.2 enhanced-resolve: 5.20.0 @@ -19366,7 +19549,7 @@ snapshots: semver: 7.7.4 source-map: 0.7.6 typescript: 5.9.3 - webpack: 5.104.1 + webpack: 5.104.1(esbuild@0.27.4) ts-morph@26.0.0: dependencies: @@ -19695,7 +19878,7 @@ snapshots: webpack-sources@3.3.4: {} - webpack@5.104.1: + webpack@5.104.1(esbuild@0.27.4): dependencies: '@types/eslint-scope': 3.7.7 '@types/estree': 1.0.8 @@ -19719,7 +19902,7 @@ snapshots: neo-async: 2.6.2 schema-utils: 4.3.3 tapable: 2.3.0 - terser-webpack-plugin: 5.3.16(webpack@5.104.1) + terser-webpack-plugin: 5.3.16(esbuild@0.27.4)(webpack@5.104.1(esbuild@0.27.4)) watchpack: 2.5.1 webpack-sources: 3.3.4 transitivePeerDependencies: