@saasicat/spec 0.27.0 → 1.0.0-rc.1

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.
@@ -11,17 +11,17 @@ description: |
11
11
 
12
12
  setup:
13
13
  - createTenant:
14
- slug: 'test-bestand'
15
- email: 'owner@test-bestand.example'
14
+ slug: 'test-existing-contracts'
15
+ email: 'owner@test-existing-contracts.example'
16
16
  planId: 'STANDARD'
17
17
  billingCycle: MONTHLY
18
18
  - assertSubscriptionVersion:
19
- tenantSlug: 'test-bestand'
19
+ tenantSlug: 'test-existing-contracts'
20
20
  version: 1 # initial version
21
21
  - storeAs:
22
22
  key: 'originalPlanVersionId'
23
23
  from: 'tenant.subscription.planVersionId'
24
- tenantSlug: 'test-bestand'
24
+ tenantSlug: 'test-existing-contracts'
25
25
 
26
26
  when:
27
27
  # SUPER_ADMIN publishes a new version — e.g. with a price increase.
@@ -37,16 +37,16 @@ when:
37
37
  then:
38
38
  # Existing subscription remains unchanged.
39
39
  - assertSubscription:
40
- tenantSlug: 'test-bestand'
40
+ tenantSlug: 'test-existing-contracts'
41
41
  planVersionId: '{{originalPlanVersionId}}' # ← same value as before publish
42
42
  # The tenant keeps paying the old price.
43
43
  - assertSubscriptionPriceMonthlyNet:
44
- tenantSlug: 'test-bestand'
44
+ tenantSlug: 'test-existing-contracts'
45
45
  value: 24.90
46
46
  # pendingPlanVersion fields are not yet set (the notification cron
47
47
  # has not run yet).
48
48
  - assertSubscription:
49
- tenantSlug: 'test-bestand'
49
+ tenantSlug: 'test-existing-contracts'
50
50
  pendingPlanVersionId: null
51
51
  pendingPlanVersionEffectiveAt: null
52
52
 
@@ -5,7 +5,7 @@ openapi: 3.1.0
5
5
  #
6
6
  # NORMATIVE contract for the SuperAdmin backend. Every implementation
7
7
  # (reference: @saasicat/nest) MUST fulfill this contract. Acceptance tests
8
- # in saas-platform-spec/acceptance/ validate implementations against exactly
8
+ # in acceptance/ validate implementations against exactly
9
9
  # these endpoints.
10
10
  #
11
11
  # Path convention (see SPEC §8.1): All admin endpoints live under
@@ -660,7 +660,7 @@ paths:
660
660
 
661
661
  # ────────────────────────────────────────────────────────
662
662
  # Catalog V2 — Plan/Bundle/Marketing/Promotion + Discovery
663
- # (CatalogModule, saas-platform-nest/src/catalog/*; DTO = SSOT for schemas)
663
+ # (CatalogModule, packages/nest/src/catalog/*; DTO = SSOT for schemas)
664
664
  # ────────────────────────────────────────────────────────
665
665
 
666
666
  # ── Plans ──
@@ -1240,7 +1240,7 @@ components:
1240
1240
  schema: { type: string, pattern: '^[a-z0-9][a-z0-9-]{1,62}[a-z0-9]$' }
1241
1241
 
1242
1242
  schemas:
1243
- # ────────── Catalog V2 (DTO = SSOT: saas-platform-nest/src/catalog/dto/*) ──────────
1243
+ # ────────── Catalog V2 (DTO = SSOT: packages/nest/src/catalog/dto/*) ──────────
1244
1244
  CatalogPlanCreate:
1245
1245
  type: object
1246
1246
  required: [projectKey, planKey, label]
@@ -1461,7 +1461,7 @@ components:
1461
1461
  snapshot:
1462
1462
  type: object
1463
1463
  additionalProperties: true
1464
- description: 'DiscoverySnapshot (app/features/quotas/capabilities) from @saasicat/types'
1464
+ description: 'DiscoverySnapshot (app/features/quotas/capabilities) from @saasicat/core'
1465
1465
 
1466
1466
  CatalogMarketingSettingsUpdate:
1467
1467
  type: object
@@ -47,7 +47,7 @@ Setup via `… admin mfa-setup` (generates a secret, shows a QR code, persists
47
47
  setup. Wrong code → exit code `3`.
48
48
 
49
49
  `isMfaSetupRequired` and `verifyMfaCode` are passed through via the platform
50
- `MfaPort` interface (see `@saasicat/types`, `src/ports/core-ports.types.ts`)
50
+ `MfaPort` interface (see `@saasicat/core`, `src/ports/core-ports.types.ts`)
51
51
  — consumers implement the persistence.
52
52
 
53
53
  ## 3. Production Confirm
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saasicat/spec",
3
- "version": "0.27.0",
3
+ "version": "1.0.0-rc.1",
4
4
  "description": "Language-neutral spec of the SaaS platform: JSON Schemas, OpenAPI contract, Prisma fragments, acceptance scenarios.",
5
5
  "type": "module",
6
6
  "main": "./index.cjs",
@@ -53,7 +53,7 @@
53
53
  "repository": {
54
54
  "type": "git",
55
55
  "url": "https://github.com/uelker70/saasicat.git",
56
- "directory": "packages/saas-platform-spec"
56
+ "directory": "packages/spec"
57
57
  },
58
58
  "bugs": {
59
59
  "url": "https://github.com/uelker70/saasicat/issues"
@@ -76,7 +76,7 @@ model PromoCode {
76
76
  revenueDeductionAccount String?
77
77
 
78
78
  // SUPER_ADMIN user ID (consumer FK, see header). Nullable to match
79
- // `PromoCodeRecord.createdById: string | null` in @saasicat/types — rows
79
+ // `PromoCodeRecord.createdById: string | null` in @saasicat/core — rows
80
80
  // whose creator is gone, or that predate the column, stay readable.
81
81
  // Creation still requires it: `CreatePromoCodeData.createdById` is `string`.
82
82
  createdById String?
@@ -72,7 +72,7 @@ model PlanVersion {
72
72
 
73
73
  publishedAt DateTime?
74
74
  supersededAt DateTime?
75
- publishedChanges Json? // VersionChange[] — see @saasicat/types
75
+ publishedChanges Json? // VersionChange[] — see @saasicat/core
76
76
  changeNote String
77
77
  nonRegressive Boolean @default(true)
78
78
 
@@ -119,7 +119,7 @@ model FeatureCatalogEntry {
119
119
  core Boolean @default(false)
120
120
 
121
121
  // Code-discovered feature dependencies (#35) and succession (#39) —
122
- // see FeatureCatalogEntryRow in @saasicat/types.
122
+ // see FeatureCatalogEntryRow in @saasicat/core.
123
123
  requires String[]
124
124
  replaces String[]
125
125
  successorKey String?
@@ -15,9 +15,9 @@
15
15
  // the reference implementation, whose tables already live under the Prisma
16
16
  // default names — a subsequent `@@map` would only force a table rename.
17
17
  //
18
- // Contract: saas-platform-types/registration.types.ts (PendingRegistration,
18
+ // Contract: @saasicat/core (src/registration.types.ts) (PendingRegistration,
19
19
  // PendingRegistrationRepository, PaymentEventLog).
20
- // Service logic: saas-platform-nest/registration/PendingRegistrationService.
20
+ // Service logic: @saasicat/nest/registration (PendingRegistrationService).
21
21
 
22
22
  // Multi-step registration flow: status of a PendingRegistration
23
23
  // between sign-up-data capture (step 1) and final activation
@@ -5,7 +5,7 @@ related:
5
5
  - ../schemas/plan-catalog.schema.json
6
6
  - ../schemas/promo-code.schema.json
7
7
  - ../schemas/audit-event.schema.json
8
- - ../../saas-platform-types/src/subscription.types.ts
8
+ - ../../types/src/subscription.types.ts
9
9
  ---
10
10
 
11
11
  # Prisma Fragments
@@ -1,5 +1,5 @@
1
1
  -- =============================================================================
2
- -- SaaSicat — normative PostgreSQL constraints the Prisma DSL cannot express.
2
+ -- SaaSiCat — normative PostgreSQL constraints the Prisma DSL cannot express.
3
3
  -- =============================================================================
4
4
  --
5
5
  -- Consumers add these statements to their SQL migration after creating the
@@ -1,5 +1,5 @@
1
1
  -- =============================================================================
2
- -- SaaSicat — PostgreSQL reference schema (DERIVED ARTIFACT).
2
+ -- SaaSiCat — PostgreSQL reference schema (DERIVED ARTIFACT).
3
3
  -- =============================================================================
4
4
  --
5
5
  -- Generated via `pnpm run gen:sql` from the prisma-fragments:
@@ -790,7 +790,7 @@ ALTER TABLE "subscription_bundles" ADD CONSTRAINT "subscription_bundles_subscrip
790
790
  ALTER TABLE "subscription_bundles" ADD CONSTRAINT "subscription_bundles_bundleVersionId_fkey" FOREIGN KEY ("bundleVersionId") REFERENCES "bundle_versions"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
791
791
 
792
792
  -- =============================================================================
793
- -- SaaSicat — normative PostgreSQL constraints the Prisma DSL cannot express.
793
+ -- SaaSiCat — normative PostgreSQL constraints the Prisma DSL cannot express.
794
794
  -- =============================================================================
795
795
  --
796
796
  -- Consumers add these statements to their SQL migration after creating the