@contractspec/example.saas-boilerplate 1.44.0 → 1.45.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.
Files changed (37) hide show
  1. package/.turbo/turbo-build$colon$bundle.log +22 -22
  2. package/.turbo/turbo-build.log +28 -28
  3. package/CHANGELOG.md +45 -0
  4. package/dist/billing/billing.event.d.ts +21 -21
  5. package/dist/billing/billing.event.js +3 -3
  6. package/dist/billing/billing.event.js.map +1 -1
  7. package/dist/billing/billing.operations.d.ts +43 -43
  8. package/dist/billing/billing.operations.js +5 -5
  9. package/dist/billing/billing.operations.js.map +1 -1
  10. package/dist/billing/billing.presentation.js +2 -2
  11. package/dist/billing/billing.presentation.js.map +1 -1
  12. package/dist/dashboard/dashboard.presentation.js +2 -2
  13. package/dist/dashboard/dashboard.presentation.js.map +1 -1
  14. package/dist/example.d.ts +3 -33
  15. package/dist/example.d.ts.map +1 -1
  16. package/dist/example.js +16 -11
  17. package/dist/example.js.map +1 -1
  18. package/dist/project/project.event.js +4 -4
  19. package/dist/project/project.event.js.map +1 -1
  20. package/dist/project/project.operations.d.ts +3 -3
  21. package/dist/project/project.operations.js +8 -8
  22. package/dist/project/project.operations.js.map +1 -1
  23. package/dist/project/project.presentation.js +2 -2
  24. package/dist/project/project.presentation.js.map +1 -1
  25. package/dist/saas-boilerplate.feature.js +38 -38
  26. package/dist/saas-boilerplate.feature.js.map +1 -1
  27. package/package.json +10 -10
  28. package/src/billing/billing.event.ts +3 -3
  29. package/src/billing/billing.operations.ts +5 -5
  30. package/src/billing/billing.presentation.ts +2 -2
  31. package/src/dashboard/dashboard.presentation.ts +2 -2
  32. package/src/example.ts +16 -9
  33. package/src/project/project.event.ts +4 -4
  34. package/src/project/project.operations.ts +8 -8
  35. package/src/project/project.presentation.ts +2 -2
  36. package/src/saas-boilerplate.feature.ts +42 -38
  37. package/tsconfig.tsbuildinfo +1 -1
@@ -1,100 +1,100 @@
1
- import * as _contractspec_lib_schema60 from "@contractspec/lib.schema";
2
- import * as _contractspec_lib_contracts2 from "@contractspec/lib.contracts";
1
+ import * as _contractspec_lib_schema41 from "@contractspec/lib.schema";
2
+ import * as _contractspec_lib_contracts0 from "@contractspec/lib.contracts";
3
3
 
4
4
  //#region src/billing/billing.operations.d.ts
5
5
  /**
6
6
  * Get subscription status.
7
7
  */
8
- declare const GetSubscriptionContract: _contractspec_lib_contracts2.OperationSpec<_contractspec_lib_schema60.AnySchemaModel, _contractspec_lib_schema60.SchemaModel<{
8
+ declare const GetSubscriptionContract: _contractspec_lib_contracts0.OperationSpec<_contractspec_lib_schema41.AnySchemaModel, _contractspec_lib_schema41.SchemaModel<{
9
9
  id: {
10
- type: _contractspec_lib_schema60.FieldType<string, string>;
10
+ type: _contractspec_lib_schema41.FieldType<string, string>;
11
11
  isOptional: false;
12
12
  };
13
13
  organizationId: {
14
- type: _contractspec_lib_schema60.FieldType<string, string>;
14
+ type: _contractspec_lib_schema41.FieldType<string, string>;
15
15
  isOptional: false;
16
16
  };
17
17
  planId: {
18
- type: _contractspec_lib_schema60.FieldType<string, string>;
18
+ type: _contractspec_lib_schema41.FieldType<string, string>;
19
19
  isOptional: false;
20
20
  };
21
21
  planName: {
22
- type: _contractspec_lib_schema60.FieldType<string, string>;
22
+ type: _contractspec_lib_schema41.FieldType<string, string>;
23
23
  isOptional: false;
24
24
  };
25
25
  status: {
26
- type: _contractspec_lib_schema60.EnumType<[string, string, string, string, string]>;
26
+ type: _contractspec_lib_schema41.EnumType<[string, string, string, string, string]>;
27
27
  isOptional: false;
28
28
  };
29
29
  currentPeriodStart: {
30
- type: _contractspec_lib_schema60.FieldType<Date, string>;
30
+ type: _contractspec_lib_schema41.FieldType<Date, string>;
31
31
  isOptional: false;
32
32
  };
33
33
  currentPeriodEnd: {
34
- type: _contractspec_lib_schema60.FieldType<Date, string>;
34
+ type: _contractspec_lib_schema41.FieldType<Date, string>;
35
35
  isOptional: false;
36
36
  };
37
37
  trialEndsAt: {
38
- type: _contractspec_lib_schema60.FieldType<Date, string>;
38
+ type: _contractspec_lib_schema41.FieldType<Date, string>;
39
39
  isOptional: true;
40
40
  };
41
41
  cancelAtPeriodEnd: {
42
- type: _contractspec_lib_schema60.FieldType<boolean, boolean>;
42
+ type: _contractspec_lib_schema41.FieldType<boolean, boolean>;
43
43
  isOptional: false;
44
44
  };
45
45
  }>, undefined>;
46
46
  /**
47
47
  * Record feature usage.
48
48
  */
49
- declare const RecordUsageContract: _contractspec_lib_contracts2.OperationSpec<_contractspec_lib_schema60.SchemaModel<{
49
+ declare const RecordUsageContract: _contractspec_lib_contracts0.OperationSpec<_contractspec_lib_schema41.SchemaModel<{
50
50
  feature: {
51
- type: _contractspec_lib_schema60.FieldType<string, string>;
51
+ type: _contractspec_lib_schema41.FieldType<string, string>;
52
52
  isOptional: false;
53
53
  };
54
54
  quantity: {
55
- type: _contractspec_lib_schema60.FieldType<number, number>;
55
+ type: _contractspec_lib_schema41.FieldType<number, number>;
56
56
  isOptional: false;
57
57
  };
58
58
  sourceId: {
59
- type: _contractspec_lib_schema60.FieldType<string, string>;
59
+ type: _contractspec_lib_schema41.FieldType<string, string>;
60
60
  isOptional: true;
61
61
  };
62
62
  sourceType: {
63
- type: _contractspec_lib_schema60.FieldType<string, string>;
63
+ type: _contractspec_lib_schema41.FieldType<string, string>;
64
64
  isOptional: true;
65
65
  };
66
66
  metadata: {
67
- type: _contractspec_lib_schema60.FieldType<Record<string, unknown>, Record<string, unknown>>;
67
+ type: _contractspec_lib_schema41.FieldType<Record<string, unknown>, Record<string, unknown>>;
68
68
  isOptional: true;
69
69
  };
70
- }>, _contractspec_lib_schema60.SchemaModel<{
70
+ }>, _contractspec_lib_schema41.SchemaModel<{
71
71
  recorded: {
72
- type: _contractspec_lib_schema60.FieldType<boolean, boolean>;
72
+ type: _contractspec_lib_schema41.FieldType<boolean, boolean>;
73
73
  isOptional: false;
74
74
  };
75
75
  currentUsage: {
76
- type: _contractspec_lib_schema60.FieldType<number, number>;
76
+ type: _contractspec_lib_schema41.FieldType<number, number>;
77
77
  isOptional: false;
78
78
  };
79
79
  limit: {
80
- type: _contractspec_lib_schema60.FieldType<number, number>;
80
+ type: _contractspec_lib_schema41.FieldType<number, number>;
81
81
  isOptional: true;
82
82
  };
83
83
  limitReached: {
84
- type: _contractspec_lib_schema60.FieldType<boolean, boolean>;
84
+ type: _contractspec_lib_schema41.FieldType<boolean, boolean>;
85
85
  isOptional: false;
86
86
  };
87
87
  }>, {
88
88
  key: string;
89
- version: number;
89
+ version: string;
90
90
  when: string;
91
- payload: _contractspec_lib_schema60.SchemaModel<{
91
+ payload: _contractspec_lib_schema41.SchemaModel<{
92
92
  feature: {
93
- type: _contractspec_lib_schema60.FieldType<string, string>;
93
+ type: _contractspec_lib_schema41.FieldType<string, string>;
94
94
  isOptional: false;
95
95
  };
96
96
  quantity: {
97
- type: _contractspec_lib_schema60.FieldType<number, number>;
97
+ type: _contractspec_lib_schema41.FieldType<number, number>;
98
98
  isOptional: false;
99
99
  };
100
100
  }>;
@@ -102,36 +102,36 @@ declare const RecordUsageContract: _contractspec_lib_contracts2.OperationSpec<_c
102
102
  /**
103
103
  * Get usage summary.
104
104
  */
105
- declare const GetUsageSummaryContract: _contractspec_lib_contracts2.OperationSpec<_contractspec_lib_schema60.SchemaModel<{
105
+ declare const GetUsageSummaryContract: _contractspec_lib_contracts0.OperationSpec<_contractspec_lib_schema41.SchemaModel<{
106
106
  billingPeriod: {
107
- type: _contractspec_lib_schema60.FieldType<string, string>;
107
+ type: _contractspec_lib_schema41.FieldType<string, string>;
108
108
  isOptional: true;
109
109
  };
110
- }>, _contractspec_lib_schema60.SchemaModel<{
110
+ }>, _contractspec_lib_schema41.SchemaModel<{
111
111
  billingPeriod: {
112
- type: _contractspec_lib_schema60.FieldType<string, string>;
112
+ type: _contractspec_lib_schema41.FieldType<string, string>;
113
113
  isOptional: false;
114
114
  };
115
115
  usage: {
116
- type: _contractspec_lib_schema60.SchemaModel<{
116
+ type: _contractspec_lib_schema41.SchemaModel<{
117
117
  feature: {
118
- type: _contractspec_lib_schema60.FieldType<string, string>;
118
+ type: _contractspec_lib_schema41.FieldType<string, string>;
119
119
  isOptional: false;
120
120
  };
121
121
  used: {
122
- type: _contractspec_lib_schema60.FieldType<number, number>;
122
+ type: _contractspec_lib_schema41.FieldType<number, number>;
123
123
  isOptional: false;
124
124
  };
125
125
  limit: {
126
- type: _contractspec_lib_schema60.FieldType<number, number>;
126
+ type: _contractspec_lib_schema41.FieldType<number, number>;
127
127
  isOptional: true;
128
128
  };
129
129
  unit: {
130
- type: _contractspec_lib_schema60.FieldType<string, string>;
130
+ type: _contractspec_lib_schema41.FieldType<string, string>;
131
131
  isOptional: true;
132
132
  };
133
133
  percentage: {
134
- type: _contractspec_lib_schema60.FieldType<number, number>;
134
+ type: _contractspec_lib_schema41.FieldType<number, number>;
135
135
  isOptional: true;
136
136
  };
137
137
  }>;
@@ -142,22 +142,22 @@ declare const GetUsageSummaryContract: _contractspec_lib_contracts2.OperationSpe
142
142
  /**
143
143
  * Check feature access.
144
144
  */
145
- declare const CheckFeatureAccessContract: _contractspec_lib_contracts2.OperationSpec<_contractspec_lib_schema60.SchemaModel<{
145
+ declare const CheckFeatureAccessContract: _contractspec_lib_contracts0.OperationSpec<_contractspec_lib_schema41.SchemaModel<{
146
146
  feature: {
147
- type: _contractspec_lib_schema60.FieldType<string, string>;
147
+ type: _contractspec_lib_schema41.FieldType<string, string>;
148
148
  isOptional: false;
149
149
  };
150
- }>, _contractspec_lib_schema60.SchemaModel<{
150
+ }>, _contractspec_lib_schema41.SchemaModel<{
151
151
  hasAccess: {
152
- type: _contractspec_lib_schema60.FieldType<boolean, boolean>;
152
+ type: _contractspec_lib_schema41.FieldType<boolean, boolean>;
153
153
  isOptional: false;
154
154
  };
155
155
  reason: {
156
- type: _contractspec_lib_schema60.EnumType<[string, string, string, string]>;
156
+ type: _contractspec_lib_schema41.EnumType<[string, string, string, string]>;
157
157
  isOptional: true;
158
158
  };
159
159
  upgradeUrl: {
160
- type: _contractspec_lib_schema60.FieldType<string, string>;
160
+ type: _contractspec_lib_schema41.FieldType<string, string>;
161
161
  isOptional: true;
162
162
  };
163
163
  }>, undefined>;
@@ -9,7 +9,7 @@ const OWNERS = ["@example.saas-boilerplate"];
9
9
  const GetSubscriptionContract = defineQuery({
10
10
  meta: {
11
11
  key: "saas.billing.subscription.get",
12
- version: 1,
12
+ version: "1.0.0",
13
13
  stability: "stable",
14
14
  owners: [...OWNERS],
15
15
  tags: [
@@ -50,7 +50,7 @@ const GetSubscriptionContract = defineQuery({
50
50
  const RecordUsageContract = defineCommand({
51
51
  meta: {
52
52
  key: "saas.billing.usage.record",
53
- version: 1,
53
+ version: "1.0.0",
54
54
  stability: "stable",
55
55
  owners: [...OWNERS],
56
56
  tags: [
@@ -69,7 +69,7 @@ const RecordUsageContract = defineCommand({
69
69
  policy: { auth: "user" },
70
70
  sideEffects: { emits: [{
71
71
  key: "billing.usage.recorded",
72
- version: 1,
72
+ version: "1.0.0",
73
73
  when: "Usage is recorded",
74
74
  payload: UsageRecordedPayloadModel
75
75
  }] },
@@ -100,7 +100,7 @@ const RecordUsageContract = defineCommand({
100
100
  const GetUsageSummaryContract = defineQuery({
101
101
  meta: {
102
102
  key: "saas.billing.usage.summary",
103
- version: 1,
103
+ version: "1.0.0",
104
104
  stability: "stable",
105
105
  owners: [...OWNERS],
106
106
  tags: [
@@ -141,7 +141,7 @@ const GetUsageSummaryContract = defineQuery({
141
141
  const CheckFeatureAccessContract = defineQuery({
142
142
  meta: {
143
143
  key: "saas.billing.feature.check",
144
- version: 1,
144
+ version: "1.0.0",
145
145
  stability: "stable",
146
146
  owners: [...OWNERS],
147
147
  tags: [
@@ -1 +1 @@
1
- {"version":3,"file":"billing.operations.js","names":[],"sources":["../../src/billing/billing.operations.ts"],"sourcesContent":["import { defineCommand, defineQuery } from '@contractspec/lib.contracts';\nimport {\n CheckFeatureAccessInputModel,\n CheckFeatureAccessOutputModel,\n GetUsageSummaryInputModel,\n GetUsageSummaryOutputModel,\n RecordUsageInputModel,\n RecordUsageOutputModel,\n SubscriptionModel,\n UsageRecordedPayloadModel,\n} from './billing.schema';\n\nconst OWNERS = ['@example.saas-boilerplate'] as const;\n\n/**\n * Get subscription status.\n */\nexport const GetSubscriptionContract = defineQuery({\n meta: {\n key: 'saas.billing.subscription.get',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['saas', 'billing', 'subscription'],\n description: 'Get organization subscription status.',\n goal: 'Show current plan and billing status.',\n context: 'Billing page, plan upgrade prompts.',\n },\n io: {\n input: null,\n output: SubscriptionModel,\n },\n policy: {\n auth: 'user',\n },\n acceptance: {\n scenarios: [\n {\n key: 'get-subscription-happy-path',\n given: ['Organization has active subscription'],\n when: ['User requests subscription status'],\n then: ['Subscription details are returned'],\n },\n ],\n examples: [\n {\n key: 'get-basic',\n input: null,\n output: {\n plan: 'pro',\n status: 'active',\n currentPeriodEnd: '2025-02-01T00:00:00Z',\n },\n },\n ],\n },\n});\n\n/**\n * Record feature usage.\n */\nexport const RecordUsageContract = defineCommand({\n meta: {\n key: 'saas.billing.usage.record',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['saas', 'billing', 'usage'],\n description: 'Record usage of a metered feature.',\n goal: 'Track feature usage for billing.',\n context: 'Called by services when metered features are used.',\n },\n io: {\n input: RecordUsageInputModel,\n output: RecordUsageOutputModel,\n },\n policy: {\n auth: 'user',\n },\n sideEffects: {\n emits: [\n {\n key: 'billing.usage.recorded',\n version: 1,\n when: 'Usage is recorded',\n payload: UsageRecordedPayloadModel,\n },\n ],\n },\n acceptance: {\n scenarios: [\n {\n key: 'record-usage-happy-path',\n given: ['Organization exists'],\n when: ['System records feature usage'],\n then: ['Usage is recorded'],\n },\n ],\n examples: [\n {\n key: 'record-api-call',\n input: { feature: 'api_calls', quantity: 1, idempotencyKey: 'abc-123' },\n output: { recorded: true, currentUsage: 100 },\n },\n ],\n },\n});\n\n/**\n * Get usage summary.\n */\nexport const GetUsageSummaryContract = defineQuery({\n meta: {\n key: 'saas.billing.usage.summary',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['saas', 'billing', 'usage'],\n description: 'Get usage summary for the current billing period.',\n goal: 'Show usage vs limits.',\n context: 'Billing page, usage dashboards.',\n },\n io: {\n input: GetUsageSummaryInputModel,\n output: GetUsageSummaryOutputModel,\n },\n policy: {\n auth: 'user',\n },\n acceptance: {\n scenarios: [\n {\n key: 'get-usage-happy-path',\n given: ['Organization has usage history'],\n when: ['User requests usage summary'],\n then: ['Usage metrics are returned'],\n },\n ],\n examples: [\n {\n key: 'get-current-usage',\n input: { period: 'current' },\n output: { features: [{ name: 'api_calls', used: 100, limit: 1000 }] },\n },\n ],\n },\n});\n\n/**\n * Check feature access.\n */\nexport const CheckFeatureAccessContract = defineQuery({\n meta: {\n key: 'saas.billing.feature.check',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['saas', 'billing', 'feature'],\n description: 'Check if organization has access to a feature.',\n goal: 'Gate features based on plan/usage.',\n context: 'Feature access checks, upgrade prompts.',\n },\n io: {\n input: CheckFeatureAccessInputModel,\n output: CheckFeatureAccessOutputModel,\n },\n policy: {\n auth: 'user',\n },\n acceptance: {\n scenarios: [\n {\n key: 'check-access-granted',\n given: ['Organization is on Pro plan'],\n when: ['User checks access to Pro feature'],\n then: ['Access is granted'],\n },\n ],\n examples: [\n {\n key: 'check-advanced-reports',\n input: { feature: 'advanced_reports' },\n output: { hasAccess: true, reason: 'Included in Pro plan' },\n },\n ],\n },\n});\n"],"mappings":";;;;AAYA,MAAM,SAAS,CAAC,4BAA4B;;;;AAK5C,MAAa,0BAA0B,YAAY;CACjD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAQ;GAAW;GAAe;EACzC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACT;CACD,QAAQ,EACN,MAAM,QACP;CACD,YAAY;EACV,WAAW,CACT;GACE,KAAK;GACL,OAAO,CAAC,uCAAuC;GAC/C,MAAM,CAAC,oCAAoC;GAC3C,MAAM,CAAC,oCAAoC;GAC5C,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO;GACP,QAAQ;IACN,MAAM;IACN,QAAQ;IACR,kBAAkB;IACnB;GACF,CACF;EACF;CACF,CAAC;;;;AAKF,MAAa,sBAAsB,cAAc;CAC/C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAQ;GAAW;GAAQ;EAClC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACT;CACD,QAAQ,EACN,MAAM,QACP;CACD,aAAa,EACX,OAAO,CACL;EACE,KAAK;EACL,SAAS;EACT,MAAM;EACN,SAAS;EACV,CACF,EACF;CACD,YAAY;EACV,WAAW,CACT;GACE,KAAK;GACL,OAAO,CAAC,sBAAsB;GAC9B,MAAM,CAAC,+BAA+B;GACtC,MAAM,CAAC,oBAAoB;GAC5B,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO;IAAE,SAAS;IAAa,UAAU;IAAG,gBAAgB;IAAW;GACvE,QAAQ;IAAE,UAAU;IAAM,cAAc;IAAK;GAC9C,CACF;EACF;CACF,CAAC;;;;AAKF,MAAa,0BAA0B,YAAY;CACjD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAQ;GAAW;GAAQ;EAClC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACT;CACD,QAAQ,EACN,MAAM,QACP;CACD,YAAY;EACV,WAAW,CACT;GACE,KAAK;GACL,OAAO,CAAC,iCAAiC;GACzC,MAAM,CAAC,8BAA8B;GACrC,MAAM,CAAC,6BAA6B;GACrC,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO,EAAE,QAAQ,WAAW;GAC5B,QAAQ,EAAE,UAAU,CAAC;IAAE,MAAM;IAAa,MAAM;IAAK,OAAO;IAAM,CAAC,EAAE;GACtE,CACF;EACF;CACF,CAAC;;;;AAKF,MAAa,6BAA6B,YAAY;CACpD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAQ;GAAW;GAAU;EACpC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACT;CACD,QAAQ,EACN,MAAM,QACP;CACD,YAAY;EACV,WAAW,CACT;GACE,KAAK;GACL,OAAO,CAAC,8BAA8B;GACtC,MAAM,CAAC,oCAAoC;GAC3C,MAAM,CAAC,oBAAoB;GAC5B,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO,EAAE,SAAS,oBAAoB;GACtC,QAAQ;IAAE,WAAW;IAAM,QAAQ;IAAwB;GAC5D,CACF;EACF;CACF,CAAC"}
1
+ {"version":3,"file":"billing.operations.js","names":[],"sources":["../../src/billing/billing.operations.ts"],"sourcesContent":["import { defineCommand, defineQuery } from '@contractspec/lib.contracts';\nimport {\n CheckFeatureAccessInputModel,\n CheckFeatureAccessOutputModel,\n GetUsageSummaryInputModel,\n GetUsageSummaryOutputModel,\n RecordUsageInputModel,\n RecordUsageOutputModel,\n SubscriptionModel,\n UsageRecordedPayloadModel,\n} from './billing.schema';\n\nconst OWNERS = ['@example.saas-boilerplate'] as const;\n\n/**\n * Get subscription status.\n */\nexport const GetSubscriptionContract = defineQuery({\n meta: {\n key: 'saas.billing.subscription.get',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['saas', 'billing', 'subscription'],\n description: 'Get organization subscription status.',\n goal: 'Show current plan and billing status.',\n context: 'Billing page, plan upgrade prompts.',\n },\n io: {\n input: null,\n output: SubscriptionModel,\n },\n policy: {\n auth: 'user',\n },\n acceptance: {\n scenarios: [\n {\n key: 'get-subscription-happy-path',\n given: ['Organization has active subscription'],\n when: ['User requests subscription status'],\n then: ['Subscription details are returned'],\n },\n ],\n examples: [\n {\n key: 'get-basic',\n input: null,\n output: {\n plan: 'pro',\n status: 'active',\n currentPeriodEnd: '2025-02-01T00:00:00Z',\n },\n },\n ],\n },\n});\n\n/**\n * Record feature usage.\n */\nexport const RecordUsageContract = defineCommand({\n meta: {\n key: 'saas.billing.usage.record',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['saas', 'billing', 'usage'],\n description: 'Record usage of a metered feature.',\n goal: 'Track feature usage for billing.',\n context: 'Called by services when metered features are used.',\n },\n io: {\n input: RecordUsageInputModel,\n output: RecordUsageOutputModel,\n },\n policy: {\n auth: 'user',\n },\n sideEffects: {\n emits: [\n {\n key: 'billing.usage.recorded',\n version: '1.0.0',\n when: 'Usage is recorded',\n payload: UsageRecordedPayloadModel,\n },\n ],\n },\n acceptance: {\n scenarios: [\n {\n key: 'record-usage-happy-path',\n given: ['Organization exists'],\n when: ['System records feature usage'],\n then: ['Usage is recorded'],\n },\n ],\n examples: [\n {\n key: 'record-api-call',\n input: { feature: 'api_calls', quantity: 1, idempotencyKey: 'abc-123' },\n output: { recorded: true, currentUsage: 100 },\n },\n ],\n },\n});\n\n/**\n * Get usage summary.\n */\nexport const GetUsageSummaryContract = defineQuery({\n meta: {\n key: 'saas.billing.usage.summary',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['saas', 'billing', 'usage'],\n description: 'Get usage summary for the current billing period.',\n goal: 'Show usage vs limits.',\n context: 'Billing page, usage dashboards.',\n },\n io: {\n input: GetUsageSummaryInputModel,\n output: GetUsageSummaryOutputModel,\n },\n policy: {\n auth: 'user',\n },\n acceptance: {\n scenarios: [\n {\n key: 'get-usage-happy-path',\n given: ['Organization has usage history'],\n when: ['User requests usage summary'],\n then: ['Usage metrics are returned'],\n },\n ],\n examples: [\n {\n key: 'get-current-usage',\n input: { period: 'current' },\n output: { features: [{ name: 'api_calls', used: 100, limit: 1000 }] },\n },\n ],\n },\n});\n\n/**\n * Check feature access.\n */\nexport const CheckFeatureAccessContract = defineQuery({\n meta: {\n key: 'saas.billing.feature.check',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['saas', 'billing', 'feature'],\n description: 'Check if organization has access to a feature.',\n goal: 'Gate features based on plan/usage.',\n context: 'Feature access checks, upgrade prompts.',\n },\n io: {\n input: CheckFeatureAccessInputModel,\n output: CheckFeatureAccessOutputModel,\n },\n policy: {\n auth: 'user',\n },\n acceptance: {\n scenarios: [\n {\n key: 'check-access-granted',\n given: ['Organization is on Pro plan'],\n when: ['User checks access to Pro feature'],\n then: ['Access is granted'],\n },\n ],\n examples: [\n {\n key: 'check-advanced-reports',\n input: { feature: 'advanced_reports' },\n output: { hasAccess: true, reason: 'Included in Pro plan' },\n },\n ],\n },\n});\n"],"mappings":";;;;AAYA,MAAM,SAAS,CAAC,4BAA4B;;;;AAK5C,MAAa,0BAA0B,YAAY;CACjD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAQ;GAAW;GAAe;EACzC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACT;CACD,QAAQ,EACN,MAAM,QACP;CACD,YAAY;EACV,WAAW,CACT;GACE,KAAK;GACL,OAAO,CAAC,uCAAuC;GAC/C,MAAM,CAAC,oCAAoC;GAC3C,MAAM,CAAC,oCAAoC;GAC5C,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO;GACP,QAAQ;IACN,MAAM;IACN,QAAQ;IACR,kBAAkB;IACnB;GACF,CACF;EACF;CACF,CAAC;;;;AAKF,MAAa,sBAAsB,cAAc;CAC/C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAQ;GAAW;GAAQ;EAClC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACT;CACD,QAAQ,EACN,MAAM,QACP;CACD,aAAa,EACX,OAAO,CACL;EACE,KAAK;EACL,SAAS;EACT,MAAM;EACN,SAAS;EACV,CACF,EACF;CACD,YAAY;EACV,WAAW,CACT;GACE,KAAK;GACL,OAAO,CAAC,sBAAsB;GAC9B,MAAM,CAAC,+BAA+B;GACtC,MAAM,CAAC,oBAAoB;GAC5B,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO;IAAE,SAAS;IAAa,UAAU;IAAG,gBAAgB;IAAW;GACvE,QAAQ;IAAE,UAAU;IAAM,cAAc;IAAK;GAC9C,CACF;EACF;CACF,CAAC;;;;AAKF,MAAa,0BAA0B,YAAY;CACjD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAQ;GAAW;GAAQ;EAClC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACT;CACD,QAAQ,EACN,MAAM,QACP;CACD,YAAY;EACV,WAAW,CACT;GACE,KAAK;GACL,OAAO,CAAC,iCAAiC;GACzC,MAAM,CAAC,8BAA8B;GACrC,MAAM,CAAC,6BAA6B;GACrC,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO,EAAE,QAAQ,WAAW;GAC5B,QAAQ,EAAE,UAAU,CAAC;IAAE,MAAM;IAAa,MAAM;IAAK,OAAO;IAAM,CAAC,EAAE;GACtE,CACF;EACF;CACF,CAAC;;;;AAKF,MAAa,6BAA6B,YAAY;CACpD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAQ;GAAW;GAAU;EACpC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACT;CACD,QAAQ,EACN,MAAM,QACP;CACD,YAAY;EACV,WAAW,CACT;GACE,KAAK;GACL,OAAO,CAAC,8BAA8B;GACtC,MAAM,CAAC,oCAAoC;GAC3C,MAAM,CAAC,oBAAoB;GAC5B,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO,EAAE,SAAS,oBAAoB;GACtC,QAAQ;IAAE,WAAW;IAAM,QAAQ;IAAwB;GAC5D,CACF;EACF;CACF,CAAC"}
@@ -7,7 +7,7 @@ import { StabilityEnum } from "@contractspec/lib.contracts";
7
7
  const SubscriptionPresentation = {
8
8
  meta: {
9
9
  key: "saas.billing.subscription",
10
- version: 1,
10
+ version: "1.0.0",
11
11
  title: "Subscription Status",
12
12
  description: "Subscription status with plan info, limits, and current usage",
13
13
  domain: "saas-boilerplate",
@@ -31,7 +31,7 @@ const SubscriptionPresentation = {
31
31
  const UsageDashboardPresentation = {
32
32
  meta: {
33
33
  key: "saas.billing.usage",
34
- version: 1,
34
+ version: "1.0.0",
35
35
  title: "Usage Dashboard",
36
36
  description: "Usage metrics and breakdown by resource type",
37
37
  domain: "saas-boilerplate",
@@ -1 +1 @@
1
- {"version":3,"file":"billing.presentation.js","names":["SubscriptionPresentation: PresentationSpec","UsageDashboardPresentation: PresentationSpec"],"sources":["../../src/billing/billing.presentation.ts"],"sourcesContent":["import type { PresentationSpec } from '@contractspec/lib.contracts';\nimport { StabilityEnum } from '@contractspec/lib.contracts';\n\n/**\n * Presentation for subscription overview.\n */\nexport const SubscriptionPresentation: PresentationSpec = {\n meta: {\n key: 'saas.billing.subscription',\n version: 1,\n title: 'Subscription Status',\n description:\n 'Subscription status with plan info, limits, and current usage',\n domain: 'saas-boilerplate',\n owners: ['@saas-team'],\n tags: ['billing', 'subscription'],\n stability: StabilityEnum.Beta,\n goal: 'View subscription plan and status',\n context: 'Billing section',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'SubscriptionView',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['saas.billing.enabled'],\n },\n};\n\n/**\n * Presentation for usage dashboard.\n */\nexport const UsageDashboardPresentation: PresentationSpec = {\n meta: {\n key: 'saas.billing.usage',\n version: 1,\n title: 'Usage Dashboard',\n description: 'Usage metrics and breakdown by resource type',\n domain: 'saas-boilerplate',\n owners: ['@saas-team'],\n tags: ['billing', 'usage', 'metrics'],\n stability: StabilityEnum.Beta,\n goal: 'Monitor feature usage and limits',\n context: 'Billing section',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'UsageDashboardView',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['saas.billing.enabled'],\n },\n};\n"],"mappings":";;;;;;AAMA,MAAaA,2BAA6C;CACxD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,aAAa;EACtB,MAAM,CAAC,WAAW,eAAe;EACjC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,uBAAuB,EAChC;CACF;;;;AAKD,MAAaC,6BAA+C;CAC1D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,aAAa;EACtB,MAAM;GAAC;GAAW;GAAS;GAAU;EACrC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,uBAAuB,EAChC;CACF"}
1
+ {"version":3,"file":"billing.presentation.js","names":["SubscriptionPresentation: PresentationSpec","UsageDashboardPresentation: PresentationSpec"],"sources":["../../src/billing/billing.presentation.ts"],"sourcesContent":["import type { PresentationSpec } from '@contractspec/lib.contracts';\nimport { StabilityEnum } from '@contractspec/lib.contracts';\n\n/**\n * Presentation for subscription overview.\n */\nexport const SubscriptionPresentation: PresentationSpec = {\n meta: {\n key: 'saas.billing.subscription',\n version: '1.0.0',\n title: 'Subscription Status',\n description:\n 'Subscription status with plan info, limits, and current usage',\n domain: 'saas-boilerplate',\n owners: ['@saas-team'],\n tags: ['billing', 'subscription'],\n stability: StabilityEnum.Beta,\n goal: 'View subscription plan and status',\n context: 'Billing section',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'SubscriptionView',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['saas.billing.enabled'],\n },\n};\n\n/**\n * Presentation for usage dashboard.\n */\nexport const UsageDashboardPresentation: PresentationSpec = {\n meta: {\n key: 'saas.billing.usage',\n version: '1.0.0',\n title: 'Usage Dashboard',\n description: 'Usage metrics and breakdown by resource type',\n domain: 'saas-boilerplate',\n owners: ['@saas-team'],\n tags: ['billing', 'usage', 'metrics'],\n stability: StabilityEnum.Beta,\n goal: 'Monitor feature usage and limits',\n context: 'Billing section',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'UsageDashboardView',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['saas.billing.enabled'],\n },\n};\n"],"mappings":";;;;;;AAMA,MAAaA,2BAA6C;CACxD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,aAAa;EACtB,MAAM,CAAC,WAAW,eAAe;EACjC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,uBAAuB,EAChC;CACF;;;;AAKD,MAAaC,6BAA+C;CAC1D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,aAAa;EACtB,MAAM;GAAC;GAAW;GAAS;GAAU;EACrC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,uBAAuB,EAChC;CACF"}
@@ -7,7 +7,7 @@ import { StabilityEnum } from "@contractspec/lib.contracts";
7
7
  const SaasDashboardPresentation = {
8
8
  meta: {
9
9
  key: "saas.dashboard",
10
- version: 1,
10
+ version: "1.0.0",
11
11
  title: "SaaS Dashboard",
12
12
  description: "Main SaaS dashboard with project overview, usage stats, and quick actions",
13
13
  domain: "saas-boilerplate",
@@ -31,7 +31,7 @@ const SaasDashboardPresentation = {
31
31
  const SettingsPanelPresentation = {
32
32
  meta: {
33
33
  key: "saas.settings",
34
- version: 1,
34
+ version: "1.0.0",
35
35
  title: "Settings Panel",
36
36
  description: "Organization and user settings panel",
37
37
  domain: "saas-boilerplate",
@@ -1 +1 @@
1
- {"version":3,"file":"dashboard.presentation.js","names":["SaasDashboardPresentation: PresentationSpec","SettingsPanelPresentation: PresentationSpec"],"sources":["../../src/dashboard/dashboard.presentation.ts"],"sourcesContent":["import type { PresentationSpec } from '@contractspec/lib.contracts';\nimport { StabilityEnum } from '@contractspec/lib.contracts';\n\n/**\n * Main dashboard presentation for the SaaS application.\n */\nexport const SaasDashboardPresentation: PresentationSpec = {\n meta: {\n key: 'saas.dashboard',\n version: 1,\n title: 'SaaS Dashboard',\n description:\n 'Main SaaS dashboard with project overview, usage stats, and quick actions',\n domain: 'saas-boilerplate',\n owners: ['@saas-team'],\n tags: ['dashboard', 'overview'],\n stability: StabilityEnum.Beta,\n goal: 'Overview of SaaS activity and metrics',\n context: 'Main dashboard',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'SaasDashboard',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['saas.enabled'],\n },\n};\n\n/**\n * Settings panel presentation.\n */\nexport const SettingsPanelPresentation: PresentationSpec = {\n meta: {\n key: 'saas.settings',\n version: 1,\n title: 'Settings Panel',\n description: 'Organization and user settings panel',\n domain: 'saas-boilerplate',\n owners: ['@saas-team'],\n tags: ['settings', 'config'],\n stability: StabilityEnum.Beta,\n goal: 'Configure organization and user settings',\n context: 'Settings section',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'SettingsPanel',\n },\n targets: ['react'],\n policy: {\n flags: ['saas.enabled'],\n },\n};\n"],"mappings":";;;;;;AAMA,MAAaA,4BAA8C;CACzD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,aAAa;EACtB,MAAM,CAAC,aAAa,WAAW;EAC/B,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,eAAe,EACxB;CACF;;;;AAKD,MAAaC,4BAA8C;CACzD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,aAAa;EACtB,MAAM,CAAC,YAAY,SAAS;EAC5B,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,QAAQ;CAClB,QAAQ,EACN,OAAO,CAAC,eAAe,EACxB;CACF"}
1
+ {"version":3,"file":"dashboard.presentation.js","names":["SaasDashboardPresentation: PresentationSpec","SettingsPanelPresentation: PresentationSpec"],"sources":["../../src/dashboard/dashboard.presentation.ts"],"sourcesContent":["import type { PresentationSpec } from '@contractspec/lib.contracts';\nimport { StabilityEnum } from '@contractspec/lib.contracts';\n\n/**\n * Main dashboard presentation for the SaaS application.\n */\nexport const SaasDashboardPresentation: PresentationSpec = {\n meta: {\n key: 'saas.dashboard',\n version: '1.0.0',\n title: 'SaaS Dashboard',\n description:\n 'Main SaaS dashboard with project overview, usage stats, and quick actions',\n domain: 'saas-boilerplate',\n owners: ['@saas-team'],\n tags: ['dashboard', 'overview'],\n stability: StabilityEnum.Beta,\n goal: 'Overview of SaaS activity and metrics',\n context: 'Main dashboard',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'SaasDashboard',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['saas.enabled'],\n },\n};\n\n/**\n * Settings panel presentation.\n */\nexport const SettingsPanelPresentation: PresentationSpec = {\n meta: {\n key: 'saas.settings',\n version: '1.0.0',\n title: 'Settings Panel',\n description: 'Organization and user settings panel',\n domain: 'saas-boilerplate',\n owners: ['@saas-team'],\n tags: ['settings', 'config'],\n stability: StabilityEnum.Beta,\n goal: 'Configure organization and user settings',\n context: 'Settings section',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'SettingsPanel',\n },\n targets: ['react'],\n policy: {\n flags: ['saas.enabled'],\n },\n};\n"],"mappings":";;;;;;AAMA,MAAaA,4BAA8C;CACzD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,aAAa;EACtB,MAAM,CAAC,aAAa,WAAW;EAC/B,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,eAAe,EACxB;CACF;;;;AAKD,MAAaC,4BAA8C;CACzD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,aAAa;EACtB,MAAM,CAAC,YAAY,SAAS;EAC5B,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,QAAQ;CAClB,QAAQ,EACN,OAAO,CAAC,eAAe,EACxB;CACF"}
package/dist/example.d.ts CHANGED
@@ -1,37 +1,7 @@
1
+ import { ExampleSpec } from "@contractspec/lib.contracts";
2
+
1
3
  //#region src/example.d.ts
2
- declare const example: {
3
- readonly id: "saas-boilerplate";
4
- readonly title: "SaaS Boilerplate";
5
- readonly summary: "Multi-tenant SaaS foundation with orgs, projects, settings, billing usage, and RBAC.";
6
- readonly tags: readonly ["saas", "multi-tenant", "billing", "rbac"];
7
- readonly kind: "template";
8
- readonly visibility: "public";
9
- readonly docs: {
10
- readonly rootDocId: "docs.examples.saas-boilerplate";
11
- };
12
- readonly entrypoints: {
13
- readonly packageName: "@contractspec/example.saas-boilerplate";
14
- readonly feature: "./feature";
15
- readonly contracts: "./contracts";
16
- readonly presentations: "./presentations";
17
- readonly handlers: "./handlers";
18
- readonly docs: "./docs";
19
- };
20
- readonly surfaces: {
21
- readonly templates: true;
22
- readonly sandbox: {
23
- readonly enabled: true;
24
- readonly modes: readonly ["playground", "specs", "builder", "markdown", "evolution"];
25
- };
26
- readonly studio: {
27
- readonly enabled: true;
28
- readonly installable: true;
29
- };
30
- readonly mcp: {
31
- readonly enabled: true;
32
- };
33
- };
34
- };
4
+ declare const example: ExampleSpec;
35
5
  //#endregion
36
6
  export { example as default };
37
7
  //# sourceMappingURL=example.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"example.d.ts","names":[],"sources":["../src/example.ts"],"sourcesContent":[],"mappings":";cAAM;EAAA,SAAA,EA4BI,EAAA,kBAAA"}
1
+ {"version":3,"file":"example.d.ts","names":[],"sources":["../src/example.ts"],"sourcesContent":[],"mappings":";;;cAEM,SAAS"}
package/dist/example.js CHANGED
@@ -1,16 +1,21 @@
1
1
  //#region src/example.ts
2
2
  const example = {
3
- id: "saas-boilerplate",
4
- title: "SaaS Boilerplate",
5
- summary: "Multi-tenant SaaS foundation with orgs, projects, settings, billing usage, and RBAC.",
6
- tags: [
7
- "saas",
8
- "multi-tenant",
9
- "billing",
10
- "rbac"
11
- ],
12
- kind: "template",
13
- visibility: "public",
3
+ meta: {
4
+ key: "saas-boilerplate",
5
+ version: "1.0.0",
6
+ title: "SaaS Boilerplate",
7
+ description: "Multi-tenant SaaS foundation with orgs, projects, settings, billing usage, and RBAC.",
8
+ kind: "template",
9
+ visibility: "public",
10
+ stability: "experimental",
11
+ owners: ["@platform.core"],
12
+ tags: [
13
+ "saas",
14
+ "multi-tenant",
15
+ "billing",
16
+ "rbac"
17
+ ]
18
+ },
14
19
  docs: { rootDocId: "docs.examples.saas-boilerplate" },
15
20
  entrypoints: {
16
21
  packageName: "@contractspec/example.saas-boilerplate",
@@ -1 +1 @@
1
- {"version":3,"file":"example.js","names":[],"sources":["../src/example.ts"],"sourcesContent":["const example = {\n id: 'saas-boilerplate',\n title: 'SaaS Boilerplate',\n summary:\n 'Multi-tenant SaaS foundation with orgs, projects, settings, billing usage, and RBAC.',\n tags: ['saas', 'multi-tenant', 'billing', 'rbac'],\n kind: 'template',\n visibility: 'public',\n docs: {\n rootDocId: 'docs.examples.saas-boilerplate',\n },\n entrypoints: {\n packageName: '@contractspec/example.saas-boilerplate',\n feature: './feature',\n contracts: './contracts',\n presentations: './presentations',\n handlers: './handlers',\n docs: './docs',\n },\n surfaces: {\n templates: true,\n sandbox: {\n enabled: true,\n modes: ['playground', 'specs', 'builder', 'markdown', 'evolution'],\n },\n studio: { enabled: true, installable: true },\n mcp: { enabled: true },\n },\n} as const;\n\nexport default example;\n"],"mappings":";AAAA,MAAM,UAAU;CACd,IAAI;CACJ,OAAO;CACP,SACE;CACF,MAAM;EAAC;EAAQ;EAAgB;EAAW;EAAO;CACjD,MAAM;CACN,YAAY;CACZ,MAAM,EACJ,WAAW,kCACZ;CACD,aAAa;EACX,aAAa;EACb,SAAS;EACT,WAAW;EACX,eAAe;EACf,UAAU;EACV,MAAM;EACP;CACD,UAAU;EACR,WAAW;EACX,SAAS;GACP,SAAS;GACT,OAAO;IAAC;IAAc;IAAS;IAAW;IAAY;IAAY;GACnE;EACD,QAAQ;GAAE,SAAS;GAAM,aAAa;GAAM;EAC5C,KAAK,EAAE,SAAS,MAAM;EACvB;CACF;AAED,sBAAe"}
1
+ {"version":3,"file":"example.js","names":["example: ExampleSpec"],"sources":["../src/example.ts"],"sourcesContent":["import type { ExampleSpec } from '@contractspec/lib.contracts';\n\nconst example: ExampleSpec = {\n meta: {\n key: 'saas-boilerplate',\n version: '1.0.0',\n title: 'SaaS Boilerplate',\n description:\n 'Multi-tenant SaaS foundation with orgs, projects, settings, billing usage, and RBAC.',\n kind: 'template',\n visibility: 'public',\n stability: 'experimental',\n owners: ['@platform.core'],\n tags: ['saas', 'multi-tenant', 'billing', 'rbac'],\n },\n docs: {\n rootDocId: 'docs.examples.saas-boilerplate',\n },\n entrypoints: {\n packageName: '@contractspec/example.saas-boilerplate',\n feature: './feature',\n contracts: './contracts',\n presentations: './presentations',\n handlers: './handlers',\n docs: './docs',\n },\n surfaces: {\n templates: true,\n sandbox: {\n enabled: true,\n modes: ['playground', 'specs', 'builder', 'markdown', 'evolution'],\n },\n studio: { enabled: true, installable: true },\n mcp: { enabled: true },\n },\n};\n\nexport default example;\n"],"mappings":";AAEA,MAAMA,UAAuB;CAC3B,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,MAAM;EACN,YAAY;EACZ,WAAW;EACX,QAAQ,CAAC,iBAAiB;EAC1B,MAAM;GAAC;GAAQ;GAAgB;GAAW;GAAO;EAClD;CACD,MAAM,EACJ,WAAW,kCACZ;CACD,aAAa;EACX,aAAa;EACb,SAAS;EACT,WAAW;EACX,eAAe;EACf,UAAU;EACV,MAAM;EACP;CACD,UAAU;EACR,WAAW;EACX,SAAS;GACP,SAAS;GACT,OAAO;IAAC;IAAc;IAAS;IAAW;IAAY;IAAY;GACnE;EACD,QAAQ;GAAE,SAAS;GAAM,aAAa;GAAM;EAC5C,KAAK,EAAE,SAAS,MAAM;EACvB;CACF;AAED,sBAAe"}
@@ -109,7 +109,7 @@ const ProjectArchivedPayload = defineSchemaModel({
109
109
  const ProjectCreatedEvent = defineEvent({
110
110
  meta: {
111
111
  key: "project.created",
112
- version: 1,
112
+ version: "1.0.0",
113
113
  description: "A new project has been created.",
114
114
  stability: "stable",
115
115
  owners: ["@saas-team"],
@@ -123,7 +123,7 @@ const ProjectCreatedEvent = defineEvent({
123
123
  const ProjectUpdatedEvent = defineEvent({
124
124
  meta: {
125
125
  key: "project.updated",
126
- version: 1,
126
+ version: "1.0.0",
127
127
  description: "A project has been updated.",
128
128
  stability: "stable",
129
129
  owners: ["@saas-team"],
@@ -137,7 +137,7 @@ const ProjectUpdatedEvent = defineEvent({
137
137
  const ProjectDeletedEvent = defineEvent({
138
138
  meta: {
139
139
  key: "project.deleted",
140
- version: 1,
140
+ version: "1.0.0",
141
141
  description: "A project has been deleted.",
142
142
  stability: "stable",
143
143
  owners: ["@saas-team"],
@@ -151,7 +151,7 @@ const ProjectDeletedEvent = defineEvent({
151
151
  const ProjectArchivedEvent = defineEvent({
152
152
  meta: {
153
153
  key: "project.archived",
154
- version: 1,
154
+ version: "1.0.0",
155
155
  description: "A project has been archived.",
156
156
  stability: "stable",
157
157
  owners: ["@saas-team"],
@@ -1 +1 @@
1
- {"version":3,"file":"project.event.js","names":[],"sources":["../../src/project/project.event.ts"],"sourcesContent":["import { ScalarTypeEnum, defineSchemaModel } from '@contractspec/lib.schema';\nimport { defineEvent } from '@contractspec/lib.contracts';\n\n/**\n * Payload when a project is created.\n */\nconst ProjectCreatedPayload = defineSchemaModel({\n name: 'ProjectCreatedPayload',\n description: 'Payload when a project is created',\n fields: {\n projectId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n createdBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * Payload when a project is updated.\n */\nconst ProjectUpdatedPayload = defineSchemaModel({\n name: 'ProjectUpdatedPayload',\n description: 'Payload when a project is updated',\n fields: {\n projectId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n updatedFields: {\n type: ScalarTypeEnum.String_unsecure(),\n isArray: true,\n isOptional: false,\n },\n updatedBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * Payload when a project is deleted.\n */\nconst ProjectDeletedPayload = defineSchemaModel({\n name: 'ProjectDeletedPayload',\n description: 'Payload when a project is deleted',\n fields: {\n projectId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n deletedBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n deletedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * Payload when a project is archived.\n */\nconst ProjectArchivedPayload = defineSchemaModel({\n name: 'ProjectArchivedPayload',\n description: 'Payload when a project is archived',\n fields: {\n projectId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n archivedBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n archivedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * Event: A new project has been created.\n */\nexport const ProjectCreatedEvent = defineEvent({\n meta: {\n key: 'project.created',\n version: 1,\n description: 'A new project has been created.',\n stability: 'stable',\n owners: ['@saas-team'],\n tags: ['project', 'created'],\n },\n payload: ProjectCreatedPayload,\n});\n\n/**\n * Event: A project has been updated.\n */\nexport const ProjectUpdatedEvent = defineEvent({\n meta: {\n key: 'project.updated',\n version: 1,\n description: 'A project has been updated.',\n stability: 'stable',\n owners: ['@saas-team'],\n tags: ['project', 'updated'],\n },\n payload: ProjectUpdatedPayload,\n});\n\n/**\n * Event: A project has been deleted.\n */\nexport const ProjectDeletedEvent = defineEvent({\n meta: {\n key: 'project.deleted',\n version: 1,\n description: 'A project has been deleted.',\n stability: 'stable',\n owners: ['@saas-team'],\n tags: ['project', 'deleted'],\n },\n payload: ProjectDeletedPayload,\n});\n\n/**\n * Event: A project has been archived.\n */\nexport const ProjectArchivedEvent = defineEvent({\n meta: {\n key: 'project.archived',\n version: 1,\n description: 'A project has been archived.',\n stability: 'stable',\n owners: ['@saas-team'],\n tags: ['project', 'archived'],\n },\n payload: ProjectArchivedPayload,\n});\n"],"mappings":";;;;;;;AAMA,MAAM,wBAAwB,kBAAkB;CAC9C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,gBAAgB;GACd,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACD,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;;;;AAKF,MAAM,wBAAwB,kBAAkB;CAC9C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,eAAe;GACb,MAAM,eAAe,iBAAiB;GACtC,SAAS;GACT,YAAY;GACb;EACD,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;;;;AAKF,MAAM,wBAAwB,kBAAkB;CAC9C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,gBAAgB;GACd,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACD,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;;;;AAKF,MAAM,yBAAyB,kBAAkB;CAC/C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,YAAY;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACzE,YAAY;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EACnE;CACF,CAAC;;;;AAKF,MAAa,sBAAsB,YAAY;CAC7C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,aAAa;EACtB,MAAM,CAAC,WAAW,UAAU;EAC7B;CACD,SAAS;CACV,CAAC;;;;AAKF,MAAa,sBAAsB,YAAY;CAC7C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,aAAa;EACtB,MAAM,CAAC,WAAW,UAAU;EAC7B;CACD,SAAS;CACV,CAAC;;;;AAKF,MAAa,sBAAsB,YAAY;CAC7C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,aAAa;EACtB,MAAM,CAAC,WAAW,UAAU;EAC7B;CACD,SAAS;CACV,CAAC;;;;AAKF,MAAa,uBAAuB,YAAY;CAC9C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,aAAa;EACtB,MAAM,CAAC,WAAW,WAAW;EAC9B;CACD,SAAS;CACV,CAAC"}
1
+ {"version":3,"file":"project.event.js","names":[],"sources":["../../src/project/project.event.ts"],"sourcesContent":["import { ScalarTypeEnum, defineSchemaModel } from '@contractspec/lib.schema';\nimport { defineEvent } from '@contractspec/lib.contracts';\n\n/**\n * Payload when a project is created.\n */\nconst ProjectCreatedPayload = defineSchemaModel({\n name: 'ProjectCreatedPayload',\n description: 'Payload when a project is created',\n fields: {\n projectId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n createdBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * Payload when a project is updated.\n */\nconst ProjectUpdatedPayload = defineSchemaModel({\n name: 'ProjectUpdatedPayload',\n description: 'Payload when a project is updated',\n fields: {\n projectId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n updatedFields: {\n type: ScalarTypeEnum.String_unsecure(),\n isArray: true,\n isOptional: false,\n },\n updatedBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * Payload when a project is deleted.\n */\nconst ProjectDeletedPayload = defineSchemaModel({\n name: 'ProjectDeletedPayload',\n description: 'Payload when a project is deleted',\n fields: {\n projectId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n deletedBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n deletedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * Payload when a project is archived.\n */\nconst ProjectArchivedPayload = defineSchemaModel({\n name: 'ProjectArchivedPayload',\n description: 'Payload when a project is archived',\n fields: {\n projectId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n archivedBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n archivedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * Event: A new project has been created.\n */\nexport const ProjectCreatedEvent = defineEvent({\n meta: {\n key: 'project.created',\n version: '1.0.0',\n description: 'A new project has been created.',\n stability: 'stable',\n owners: ['@saas-team'],\n tags: ['project', 'created'],\n },\n payload: ProjectCreatedPayload,\n});\n\n/**\n * Event: A project has been updated.\n */\nexport const ProjectUpdatedEvent = defineEvent({\n meta: {\n key: 'project.updated',\n version: '1.0.0',\n description: 'A project has been updated.',\n stability: 'stable',\n owners: ['@saas-team'],\n tags: ['project', 'updated'],\n },\n payload: ProjectUpdatedPayload,\n});\n\n/**\n * Event: A project has been deleted.\n */\nexport const ProjectDeletedEvent = defineEvent({\n meta: {\n key: 'project.deleted',\n version: '1.0.0',\n description: 'A project has been deleted.',\n stability: 'stable',\n owners: ['@saas-team'],\n tags: ['project', 'deleted'],\n },\n payload: ProjectDeletedPayload,\n});\n\n/**\n * Event: A project has been archived.\n */\nexport const ProjectArchivedEvent = defineEvent({\n meta: {\n key: 'project.archived',\n version: '1.0.0',\n description: 'A project has been archived.',\n stability: 'stable',\n owners: ['@saas-team'],\n tags: ['project', 'archived'],\n },\n payload: ProjectArchivedPayload,\n});\n"],"mappings":";;;;;;;AAMA,MAAM,wBAAwB,kBAAkB;CAC9C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,gBAAgB;GACd,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACD,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;;;;AAKF,MAAM,wBAAwB,kBAAkB;CAC9C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,eAAe;GACb,MAAM,eAAe,iBAAiB;GACtC,SAAS;GACT,YAAY;GACb;EACD,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;;;;AAKF,MAAM,wBAAwB,kBAAkB;CAC9C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,gBAAgB;GACd,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACD,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;;;;AAKF,MAAM,yBAAyB,kBAAkB;CAC/C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,YAAY;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACzE,YAAY;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EACnE;CACF,CAAC;;;;AAKF,MAAa,sBAAsB,YAAY;CAC7C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,aAAa;EACtB,MAAM,CAAC,WAAW,UAAU;EAC7B;CACD,SAAS;CACV,CAAC;;;;AAKF,MAAa,sBAAsB,YAAY;CAC7C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,aAAa;EACtB,MAAM,CAAC,WAAW,UAAU;EAC7B;CACD,SAAS;CACV,CAAC;;;;AAKF,MAAa,sBAAsB,YAAY;CAC7C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,aAAa;EACtB,MAAM,CAAC,WAAW,UAAU;EAC7B;CACD,SAAS;CACV,CAAC;;;;AAKF,MAAa,uBAAuB,YAAY;CAC9C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,aAAa;EACtB,MAAM,CAAC,WAAW,WAAW;EAC9B;CACD,SAAS;CACV,CAAC"}
@@ -75,7 +75,7 @@ declare const CreateProjectContract: _contractspec_lib_contracts10.OperationSpec
75
75
  };
76
76
  }>, {
77
77
  key: string;
78
- version: number;
78
+ version: string;
79
79
  when: string;
80
80
  payload: _contractspec_lib_schema192.SchemaModel<{
81
81
  id: {
@@ -261,7 +261,7 @@ declare const UpdateProjectContract: _contractspec_lib_contracts10.OperationSpec
261
261
  };
262
262
  }>, {
263
263
  key: string;
264
- version: number;
264
+ version: string;
265
265
  when: string;
266
266
  payload: _contractspec_lib_schema192.SchemaModel<{
267
267
  id: {
@@ -326,7 +326,7 @@ declare const DeleteProjectContract: _contractspec_lib_contracts10.OperationSpec
326
326
  };
327
327
  }>, {
328
328
  key: string;
329
- version: number;
329
+ version: string;
330
330
  when: string;
331
331
  payload: _contractspec_lib_schema192.SchemaModel<{
332
332
  projectId: {
@@ -9,7 +9,7 @@ const OWNERS = ["example.saas-boilerplate"];
9
9
  const CreateProjectContract = defineCommand({
10
10
  meta: {
11
11
  key: "saas.project.create",
12
- version: 1,
12
+ version: "1.0.0",
13
13
  stability: "stable",
14
14
  owners: [...OWNERS],
15
15
  tags: [
@@ -43,7 +43,7 @@ const CreateProjectContract = defineCommand({
43
43
  sideEffects: {
44
44
  emits: [{
45
45
  key: "project.created",
46
- version: 1,
46
+ version: "1.0.0",
47
47
  when: "Project is created",
48
48
  payload: ProjectModel
49
49
  }],
@@ -76,7 +76,7 @@ const CreateProjectContract = defineCommand({
76
76
  const GetProjectContract = defineQuery({
77
77
  meta: {
78
78
  key: "saas.project.get",
79
- version: 1,
79
+ version: "1.0.0",
80
80
  stability: "stable",
81
81
  owners: [...OWNERS],
82
82
  tags: [
@@ -122,7 +122,7 @@ const GetProjectContract = defineQuery({
122
122
  const UpdateProjectContract = defineCommand({
123
123
  meta: {
124
124
  key: "saas.project.update",
125
- version: 1,
125
+ version: "1.0.0",
126
126
  stability: "stable",
127
127
  owners: [...OWNERS],
128
128
  tags: [
@@ -142,7 +142,7 @@ const UpdateProjectContract = defineCommand({
142
142
  sideEffects: {
143
143
  emits: [{
144
144
  key: "project.updated",
145
- version: 1,
145
+ version: "1.0.0",
146
146
  when: "Project is updated",
147
147
  payload: ProjectModel
148
148
  }],
@@ -174,7 +174,7 @@ const UpdateProjectContract = defineCommand({
174
174
  const DeleteProjectContract = defineCommand({
175
175
  meta: {
176
176
  key: "saas.project.delete",
177
- version: 1,
177
+ version: "1.0.0",
178
178
  stability: "stable",
179
179
  owners: [...OWNERS],
180
180
  tags: [
@@ -194,7 +194,7 @@ const DeleteProjectContract = defineCommand({
194
194
  sideEffects: {
195
195
  emits: [{
196
196
  key: "project.deleted",
197
- version: 1,
197
+ version: "1.0.0",
198
198
  when: "Project is deleted",
199
199
  payload: ProjectDeletedPayloadModel
200
200
  }],
@@ -220,7 +220,7 @@ const DeleteProjectContract = defineCommand({
220
220
  const ListProjectsContract = defineQuery({
221
221
  meta: {
222
222
  key: "saas.project.list",
223
- version: 1,
223
+ version: "1.0.0",
224
224
  stability: "stable",
225
225
  owners: [...OWNERS],
226
226
  tags: [