fix(billing): build su VPS — ExtendedPrismaClient, apiVersion Stripe
Tre fix che emergono solo durante il build di produzione (typecheck stretto, niente tsx watch lazy):
- `packages/db` ora ri-esporta Subscription / BillingWebhookEvent / SubscriptionStatus / BillingInterval / Achievement, così non serve importare da `@prisma/client` direttamente da apps/api (che non ce l'ha tra le deps).
- `apps/api/src/modules/billing/{service,webhook.routes}.ts` usano ExtendedPrismaClient (il client post-`$extends` di prisma-field-encryption) invece di PrismaClient base. Il client esteso ha tipi diversi per via dell'estensione, e la tipizzazione stretta lo richiede.
- `apiVersion` di Stripe portata a `2026-04-22.dahlia` (la versione corrente in stripe@22.x). La precedente `2025-09-30.clover` era già obsoleta nei tipi.
Lint pulito, 99/99 test verdi, build api ok in locale.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
11d73eae69
commit
d98f95b7ca
4 files changed
+14
-9
No files matched your search
@@ -2,6 +2,7 @@ export { prisma } from './client.js';
|
||||
export type { ExtendedPrismaClient } from './client.js';
|
||||
export {
|
||||
ActivityLevel,
|
||||
BillingInterval,
|
||||
CookingTime,
|
||||
Difficulty,
|
||||
FastStatus,
|
||||
@@ -12,9 +13,12 @@ export {
|
||||
Phase,
|
||||
Prisma,
|
||||
Role,
|
||||
SubscriptionStatus,
|
||||
} from '@prisma/client';
|
||||
export type {
|
||||
Account,
|
||||
Achievement,
|
||||
BillingWebhookEvent,
|
||||
DeviceToken,
|
||||
FastEvent,
|
||||
Ingredient,
|
||||
@@ -26,6 +30,7 @@ export type {
|
||||
Recipe,
|
||||
RecipeIngredient,
|
||||
Session,
|
||||
Subscription,
|
||||
User,
|
||||
Verification,
|
||||
WeightEntry,
|
||||
|
||||
Reference in new issue
Block a user