@saasicat/adapter-prisma 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -56,34 +56,30 @@ PromoCodesModule.forRoot({
56
56
 
57
57
  ## Shipped adapters
58
58
 
59
- | Class | Implements port | Tables |
60
- | --- | --- | --- |
61
- | `PrismaTransactionRunner` | `TransactionRunner` | — (`$transaction`) |
62
- | `PrismaMfaAdapter` | `MfaPort` | `super_admin_mfa` |
63
- | `PrismaAuditAdapter` | `AuditPort` | `audit_logs` |
64
- | `PrismaAuditQueryAdapter` | `AuditQueryPort` | `audit_logs` |
65
- | `PrismaAuditStatsAdapter` | `AuditStatsPort` | `audit_logs` |
66
- | `AsyncLocalRlsBypassAdapter` | `RlsBypassPort` | (no DB access) |
67
- | `PrismaSubscriptionRepository` | `SubscriptionRepository` | `subscriptions`, `plan_versions` |
68
- | `PrismaPlanVersionRepository` | `PlanVersionRepository` | `plan_versions` |
69
- | `PrismaPromoCodeRepository` | `PromoCodeRepository` | `promo_codes` |
70
- | `PrismaPromoCodeRedemptionRepository` | `PromoCodeRedemptionRepository` | `promo_code_redemptions` |
71
- | `PrismaPromoCodeValidationLogRepository` | `PromoCodeValidationLogRepository` | `promo_code_validation_logs` |
72
- | `PrismaPromoSubscriptionLookup` | `PromoSubscriptionLookup` | `subscriptions` |
73
- | `ZeroPromoRevenueDeductionAggregator` | `PromoRevenueDeductionAggregator` | — (constant `'0.00'`) |
74
- | `PrismaSuperAdminBootstrapAdapter` | `SuperAdminProvisioningPort` | `super_admin_users` |
75
- | `PrismaPlanCatalogReadSink` | `PlanCatalogReadSink` | `plans`, `plan_versions`, `feature_catalog_entries` |
76
- | `PrismaPlanCatalogImportSink` | `PlanCatalogImportSink` | same |
59
+ | Class | Implements port | Tables |
60
+ | ---------------------------------------- | ---------------------------------- | --------------------------------------------------- |
61
+ | `PrismaTransactionRunner` | `TransactionRunner` | — (`$transaction`) |
62
+ | `PrismaMfaAdapter` | `MfaPort` | `super_admin_mfa` |
63
+ | `PrismaAuditAdapter` | `AuditPort` | `audit_logs` |
64
+ | `PrismaAuditQueryAdapter` | `AuditQueryPort` | `audit_logs` |
65
+ | `PrismaAuditStatsAdapter` | `AuditStatsPort` | `audit_logs` |
66
+ | `AsyncLocalRlsBypassAdapter` | `RlsBypassPort` | (no DB access) |
67
+ | `PrismaSubscriptionRepository` | `SubscriptionRepository` | `subscriptions`, `plan_versions` |
68
+ | `PrismaPlanVersionRepository` | `PlanVersionRepository` | `plan_versions` |
69
+ | `PrismaPromoCodeRepository` | `PromoCodeRepository` | `promo_codes` |
70
+ | `PrismaPromoCodeRedemptionRepository` | `PromoCodeRedemptionRepository` | `promo_code_redemptions` |
71
+ | `PrismaPromoCodeValidationLogRepository` | `PromoCodeValidationLogRepository` | `promo_code_validation_logs` |
72
+ | `PrismaPromoSubscriptionLookup` | `PromoSubscriptionLookup` | `subscriptions` |
73
+ | `ZeroPromoRevenueDeductionAggregator` | `PromoRevenueDeductionAggregator` | — (constant `'0.00'`) |
74
+ | `PrismaSuperAdminBootstrapAdapter` | `SuperAdminProvisioningPort` | `super_admin_users` |
75
+ | `PrismaPlanCatalogReadSink` | `PlanCatalogReadSink` | `plans`, `plan_versions`, `feature_catalog_entries` |
76
+ | `PrismaPlanCatalogImportSink` | `PlanCatalogImportSink` | same |
77
77
 
78
78
  Not shipped (custom adapters stay yours): subscription contracts, bundle
79
79
  bookings, registration, tenant-billing write ports, `FirstTimeCustomerCheck`.
80
80
  Absent optional repository methods degrade fail-closed as documented on the
81
81
  ports (e.g. `countByBundleVersionId`).
82
82
 
83
- Known limitation: subscriptions binding ONLY a `businessTypeVersionId` (no
84
- `planVersionId`) raise a descriptive error — BusinessType aggregation needs a
85
- custom `SubscriptionRepository`.
86
-
87
83
  ## Manual wiring (custom setups)
88
84
 
89
85
  All classes inject the Prisma client via `PRISMA_CLIENT_TOKEN`: