@saasicat/spec 0.27.0 → 1.0.0-rc.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/acceptance/plan-version/{publish-does-not-touch-bestand.yaml → publish-does-not-touch-existing-contracts.yaml} +7 -7
- package/admin-api.openapi.yaml +3 -3
- package/package.json +2 -2
- package/prisma-fragments/09-pending-registration.prisma +2 -2
- package/prisma-fragments/README.md +1 -1
- package/sql/constraints.postgres.sql +1 -1
- package/sql/reference-schema.postgres.sql +2 -2
|
@@ -11,17 +11,17 @@ description: |
|
|
|
11
11
|
|
|
12
12
|
setup:
|
|
13
13
|
- createTenant:
|
|
14
|
-
slug: 'test-
|
|
15
|
-
email: 'owner@test-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
49
|
+
tenantSlug: 'test-existing-contracts'
|
|
50
50
|
pendingPlanVersionId: null
|
|
51
51
|
pendingPlanVersionEffectiveAt: null
|
|
52
52
|
|
package/admin-api.openapi.yaml
CHANGED
|
@@ -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
|
|
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,
|
|
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:
|
|
1243
|
+
# ────────── Catalog V2 (DTO = SSOT: packages/nest/src/catalog/dto/*) ──────────
|
|
1244
1244
|
CatalogPlanCreate:
|
|
1245
1245
|
type: object
|
|
1246
1246
|
required: [projectKey, planKey, label]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saasicat/spec",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0-rc.0",
|
|
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/
|
|
56
|
+
"directory": "packages/spec"
|
|
57
57
|
},
|
|
58
58
|
"bugs": {
|
|
59
59
|
"url": "https://github.com/uelker70/saasicat/issues"
|
|
@@ -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:
|
|
18
|
+
// Contract: @saasicat/types (src/registration.types.ts) (PendingRegistration,
|
|
19
19
|
// PendingRegistrationRepository, PaymentEventLog).
|
|
20
|
-
// Service logic:
|
|
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
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
-- =============================================================================
|
|
2
|
-
--
|
|
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
|
-
--
|
|
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
|
-
--
|
|
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
|