@contractspec/example.saas-boilerplate 1.46.1 → 1.47.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 (135) hide show
  1. package/.turbo/turbo-build$colon$bundle.log +183 -108
  2. package/.turbo/turbo-build.log +182 -107
  3. package/CHANGELOG.md +45 -0
  4. package/README.md +0 -1
  5. package/dist/billing/billing.event.d.ts +4 -4
  6. package/dist/billing/billing.event.js +1 -1
  7. package/dist/billing/billing.operations.d.ts +5 -5
  8. package/dist/billing/billing.presentation.d.ts +3 -4
  9. package/dist/billing/billing.presentation.d.ts.map +1 -1
  10. package/dist/billing/billing.presentation.js +5 -5
  11. package/dist/billing/billing.presentation.js.map +1 -1
  12. package/dist/dashboard/dashboard.presentation.d.ts +3 -4
  13. package/dist/dashboard/dashboard.presentation.d.ts.map +1 -1
  14. package/dist/dashboard/dashboard.presentation.js +5 -5
  15. package/dist/dashboard/dashboard.presentation.js.map +1 -1
  16. package/dist/example.d.ts +2 -2
  17. package/dist/example.d.ts.map +1 -1
  18. package/dist/example.js +4 -2
  19. package/dist/example.js.map +1 -1
  20. package/dist/handlers/index.d.ts +2 -1
  21. package/dist/handlers/index.js +2 -1
  22. package/dist/handlers/saas.handlers.d.ts +68 -0
  23. package/dist/handlers/saas.handlers.d.ts.map +1 -0
  24. package/dist/handlers/saas.handlers.js +148 -0
  25. package/dist/handlers/saas.handlers.js.map +1 -0
  26. package/dist/index.d.ts +13 -1
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +13 -1
  29. package/dist/index.js.map +1 -1
  30. package/dist/project/project.enum.d.ts +3 -3
  31. package/dist/project/project.event.d.ts +22 -22
  32. package/dist/project/project.event.d.ts.map +1 -1
  33. package/dist/project/project.event.js +1 -1
  34. package/dist/project/project.operations.d.ts +103 -103
  35. package/dist/project/project.presentation.d.ts +3 -4
  36. package/dist/project/project.presentation.d.ts.map +1 -1
  37. package/dist/project/project.presentation.js +5 -5
  38. package/dist/project/project.presentation.js.map +1 -1
  39. package/dist/project/project.schema.d.ts +54 -54
  40. package/dist/saas-boilerplate.feature.d.ts +2 -2
  41. package/dist/saas-boilerplate.feature.d.ts.map +1 -1
  42. package/dist/saas-boilerplate.feature.js +9 -2
  43. package/dist/saas-boilerplate.feature.js.map +1 -1
  44. package/dist/seeders/index.d.ts +10 -0
  45. package/dist/seeders/index.d.ts.map +1 -0
  46. package/dist/seeders/index.js +19 -0
  47. package/dist/seeders/index.js.map +1 -0
  48. package/dist/settings/settings.entity.d.ts +24 -24
  49. package/dist/settings/settings.enum.d.ts +2 -2
  50. package/dist/shared/overlay-types.d.ts +34 -0
  51. package/dist/shared/overlay-types.d.ts.map +1 -0
  52. package/dist/shared/overlay-types.js +0 -0
  53. package/dist/tests/operations.test-spec.d.ts +10 -0
  54. package/dist/tests/operations.test-spec.d.ts.map +1 -0
  55. package/dist/tests/operations.test-spec.js +123 -0
  56. package/dist/tests/operations.test-spec.js.map +1 -0
  57. package/dist/ui/SaasDashboard.d.ts +7 -0
  58. package/dist/ui/SaasDashboard.d.ts.map +1 -0
  59. package/dist/ui/SaasDashboard.js +298 -0
  60. package/dist/ui/SaasDashboard.js.map +1 -0
  61. package/dist/ui/SaasProjectList.d.ts +14 -0
  62. package/dist/ui/SaasProjectList.d.ts.map +1 -0
  63. package/dist/ui/SaasProjectList.js +76 -0
  64. package/dist/ui/SaasProjectList.js.map +1 -0
  65. package/dist/ui/SaasSettingsPanel.d.ts +7 -0
  66. package/dist/ui/SaasSettingsPanel.d.ts.map +1 -0
  67. package/dist/ui/SaasSettingsPanel.js +138 -0
  68. package/dist/ui/SaasSettingsPanel.js.map +1 -0
  69. package/dist/ui/hooks/index.d.ts +3 -0
  70. package/dist/ui/hooks/index.js +6 -0
  71. package/dist/ui/hooks/useProjectList.d.ts +34 -0
  72. package/dist/ui/hooks/useProjectList.d.ts.map +1 -0
  73. package/dist/ui/hooks/useProjectList.js +75 -0
  74. package/dist/ui/hooks/useProjectList.js.map +1 -0
  75. package/dist/ui/hooks/useProjectMutations.d.ts +28 -0
  76. package/dist/ui/hooks/useProjectMutations.d.ts.map +1 -0
  77. package/dist/ui/hooks/useProjectMutations.js +146 -0
  78. package/dist/ui/hooks/useProjectMutations.js.map +1 -0
  79. package/dist/ui/index.d.ts +14 -0
  80. package/dist/ui/index.js +15 -0
  81. package/dist/ui/modals/CreateProjectModal.d.ts +23 -0
  82. package/dist/ui/modals/CreateProjectModal.d.ts.map +1 -0
  83. package/dist/ui/modals/CreateProjectModal.js +139 -0
  84. package/dist/ui/modals/CreateProjectModal.js.map +1 -0
  85. package/dist/ui/modals/ProjectActionsModal.d.ts +38 -0
  86. package/dist/ui/modals/ProjectActionsModal.d.ts.map +1 -0
  87. package/dist/ui/modals/ProjectActionsModal.js +292 -0
  88. package/dist/ui/modals/ProjectActionsModal.js.map +1 -0
  89. package/dist/ui/modals/index.d.ts +3 -0
  90. package/dist/ui/modals/index.js +4 -0
  91. package/dist/ui/overlays/demo-overlays.d.ts +19 -0
  92. package/dist/ui/overlays/demo-overlays.d.ts.map +1 -0
  93. package/dist/ui/overlays/demo-overlays.js +70 -0
  94. package/dist/ui/overlays/demo-overlays.js.map +1 -0
  95. package/dist/ui/overlays/index.d.ts +2 -0
  96. package/dist/ui/overlays/index.js +3 -0
  97. package/dist/ui/renderers/index.d.ts +3 -0
  98. package/dist/ui/renderers/index.js +4 -0
  99. package/dist/ui/renderers/project-list.markdown.d.ts +31 -0
  100. package/dist/ui/renderers/project-list.markdown.d.ts.map +1 -0
  101. package/dist/ui/renderers/project-list.markdown.js +148 -0
  102. package/dist/ui/renderers/project-list.markdown.js.map +1 -0
  103. package/dist/ui/renderers/project-list.renderer.d.ts +9 -0
  104. package/dist/ui/renderers/project-list.renderer.d.ts.map +1 -0
  105. package/dist/ui/renderers/project-list.renderer.js +17 -0
  106. package/dist/ui/renderers/project-list.renderer.js.map +1 -0
  107. package/package.json +38 -14
  108. package/src/billing/billing.presentation.ts +5 -6
  109. package/src/dashboard/dashboard.presentation.ts +5 -6
  110. package/src/example.ts +3 -3
  111. package/src/handlers/index.ts +3 -0
  112. package/src/handlers/saas.handlers.ts +300 -0
  113. package/src/index.ts +5 -0
  114. package/src/project/project.presentation.ts +5 -6
  115. package/src/saas-boilerplate.feature.ts +3 -3
  116. package/src/seeders/index.ts +28 -0
  117. package/src/shared/overlay-types.ts +39 -0
  118. package/src/tests/operations.test-spec.ts +109 -0
  119. package/src/ui/SaasDashboard.tsx +325 -0
  120. package/src/ui/SaasProjectList.tsx +113 -0
  121. package/src/ui/SaasSettingsPanel.tsx +96 -0
  122. package/src/ui/hooks/index.ts +10 -0
  123. package/src/ui/hooks/useProjectList.ts +95 -0
  124. package/src/ui/hooks/useProjectMutations.ts +166 -0
  125. package/src/ui/index.ts +18 -0
  126. package/src/ui/modals/CreateProjectModal.tsx +176 -0
  127. package/src/ui/modals/ProjectActionsModal.tsx +346 -0
  128. package/src/ui/modals/index.ts +2 -0
  129. package/src/ui/overlays/demo-overlays.ts +74 -0
  130. package/src/ui/overlays/index.ts +1 -0
  131. package/src/ui/renderers/index.ts +7 -0
  132. package/src/ui/renderers/project-list.markdown.ts +239 -0
  133. package/src/ui/renderers/project-list.renderer.tsx +22 -0
  134. package/tsconfig.json +1 -1
  135. package/tsconfig.tsbuildinfo +1 -1
@@ -1,78 +1,78 @@
1
- import * as _contractspec_lib_schema194 from "@contractspec/lib.schema";
1
+ import * as _contractspec_lib_schema293 from "@contractspec/lib.schema";
2
2
 
3
3
  //#region src/project/project.schema.d.ts
4
4
  /**
5
5
  * A project within an organization.
6
6
  */
7
- declare const ProjectModel: _contractspec_lib_schema194.SchemaModel<{
7
+ declare const ProjectModel: _contractspec_lib_schema293.SchemaModel<{
8
8
  id: {
9
- type: _contractspec_lib_schema194.FieldType<string, string>;
9
+ type: _contractspec_lib_schema293.FieldType<string, string>;
10
10
  isOptional: false;
11
11
  };
12
12
  name: {
13
- type: _contractspec_lib_schema194.FieldType<string, string>;
13
+ type: _contractspec_lib_schema293.FieldType<string, string>;
14
14
  isOptional: false;
15
15
  };
16
16
  description: {
17
- type: _contractspec_lib_schema194.FieldType<string, string>;
17
+ type: _contractspec_lib_schema293.FieldType<string, string>;
18
18
  isOptional: true;
19
19
  };
20
20
  slug: {
21
- type: _contractspec_lib_schema194.FieldType<string, string>;
21
+ type: _contractspec_lib_schema293.FieldType<string, string>;
22
22
  isOptional: true;
23
23
  };
24
24
  organizationId: {
25
- type: _contractspec_lib_schema194.FieldType<string, string>;
25
+ type: _contractspec_lib_schema293.FieldType<string, string>;
26
26
  isOptional: false;
27
27
  };
28
28
  createdBy: {
29
- type: _contractspec_lib_schema194.FieldType<string, string>;
29
+ type: _contractspec_lib_schema293.FieldType<string, string>;
30
30
  isOptional: false;
31
31
  };
32
32
  status: {
33
- type: _contractspec_lib_schema194.EnumType<[string, string, string, string]>;
33
+ type: _contractspec_lib_schema293.EnumType<[string, string, string, string]>;
34
34
  isOptional: false;
35
35
  };
36
36
  isPublic: {
37
- type: _contractspec_lib_schema194.FieldType<boolean, boolean>;
37
+ type: _contractspec_lib_schema293.FieldType<boolean, boolean>;
38
38
  isOptional: false;
39
39
  };
40
40
  tags: {
41
- type: _contractspec_lib_schema194.FieldType<string, string>;
41
+ type: _contractspec_lib_schema293.FieldType<string, string>;
42
42
  isArray: true;
43
43
  isOptional: false;
44
44
  };
45
45
  createdAt: {
46
- type: _contractspec_lib_schema194.FieldType<Date, string>;
46
+ type: _contractspec_lib_schema293.FieldType<Date, string>;
47
47
  isOptional: false;
48
48
  };
49
49
  updatedAt: {
50
- type: _contractspec_lib_schema194.FieldType<Date, string>;
50
+ type: _contractspec_lib_schema293.FieldType<Date, string>;
51
51
  isOptional: false;
52
52
  };
53
53
  }>;
54
54
  /**
55
55
  * Input for creating a project.
56
56
  */
57
- declare const CreateProjectInputModel: _contractspec_lib_schema194.SchemaModel<{
57
+ declare const CreateProjectInputModel: _contractspec_lib_schema293.SchemaModel<{
58
58
  name: {
59
- type: _contractspec_lib_schema194.FieldType<string, string>;
59
+ type: _contractspec_lib_schema293.FieldType<string, string>;
60
60
  isOptional: false;
61
61
  };
62
62
  description: {
63
- type: _contractspec_lib_schema194.FieldType<string, string>;
63
+ type: _contractspec_lib_schema293.FieldType<string, string>;
64
64
  isOptional: true;
65
65
  };
66
66
  slug: {
67
- type: _contractspec_lib_schema194.FieldType<string, string>;
67
+ type: _contractspec_lib_schema293.FieldType<string, string>;
68
68
  isOptional: true;
69
69
  };
70
70
  isPublic: {
71
- type: _contractspec_lib_schema194.FieldType<boolean, boolean>;
71
+ type: _contractspec_lib_schema293.FieldType<boolean, boolean>;
72
72
  isOptional: true;
73
73
  };
74
74
  tags: {
75
- type: _contractspec_lib_schema194.FieldType<string, string>;
75
+ type: _contractspec_lib_schema293.FieldType<string, string>;
76
76
  isArray: true;
77
77
  isOptional: true;
78
78
  };
@@ -80,92 +80,92 @@ declare const CreateProjectInputModel: _contractspec_lib_schema194.SchemaModel<{
80
80
  /**
81
81
  * Input for updating a project.
82
82
  */
83
- declare const UpdateProjectInputModel: _contractspec_lib_schema194.SchemaModel<{
83
+ declare const UpdateProjectInputModel: _contractspec_lib_schema293.SchemaModel<{
84
84
  projectId: {
85
- type: _contractspec_lib_schema194.FieldType<string, string>;
85
+ type: _contractspec_lib_schema293.FieldType<string, string>;
86
86
  isOptional: false;
87
87
  };
88
88
  name: {
89
- type: _contractspec_lib_schema194.FieldType<string, string>;
89
+ type: _contractspec_lib_schema293.FieldType<string, string>;
90
90
  isOptional: true;
91
91
  };
92
92
  description: {
93
- type: _contractspec_lib_schema194.FieldType<string, string>;
93
+ type: _contractspec_lib_schema293.FieldType<string, string>;
94
94
  isOptional: true;
95
95
  };
96
96
  slug: {
97
- type: _contractspec_lib_schema194.FieldType<string, string>;
97
+ type: _contractspec_lib_schema293.FieldType<string, string>;
98
98
  isOptional: true;
99
99
  };
100
100
  isPublic: {
101
- type: _contractspec_lib_schema194.FieldType<boolean, boolean>;
101
+ type: _contractspec_lib_schema293.FieldType<boolean, boolean>;
102
102
  isOptional: true;
103
103
  };
104
104
  tags: {
105
- type: _contractspec_lib_schema194.FieldType<string, string>;
105
+ type: _contractspec_lib_schema293.FieldType<string, string>;
106
106
  isArray: true;
107
107
  isOptional: true;
108
108
  };
109
109
  status: {
110
- type: _contractspec_lib_schema194.EnumType<[string, string, string, string]>;
110
+ type: _contractspec_lib_schema293.EnumType<[string, string, string, string]>;
111
111
  isOptional: true;
112
112
  };
113
113
  }>;
114
114
  /**
115
115
  * Input for getting a project.
116
116
  */
117
- declare const GetProjectInputModel: _contractspec_lib_schema194.SchemaModel<{
117
+ declare const GetProjectInputModel: _contractspec_lib_schema293.SchemaModel<{
118
118
  projectId: {
119
- type: _contractspec_lib_schema194.FieldType<string, string>;
119
+ type: _contractspec_lib_schema293.FieldType<string, string>;
120
120
  isOptional: false;
121
121
  };
122
122
  }>;
123
123
  /**
124
124
  * Input for deleting a project.
125
125
  */
126
- declare const DeleteProjectInputModel: _contractspec_lib_schema194.SchemaModel<{
126
+ declare const DeleteProjectInputModel: _contractspec_lib_schema293.SchemaModel<{
127
127
  projectId: {
128
- type: _contractspec_lib_schema194.FieldType<string, string>;
128
+ type: _contractspec_lib_schema293.FieldType<string, string>;
129
129
  isOptional: false;
130
130
  };
131
131
  }>;
132
132
  /**
133
133
  * Output for delete operation.
134
134
  */
135
- declare const DeleteProjectOutputModel: _contractspec_lib_schema194.SchemaModel<{
135
+ declare const DeleteProjectOutputModel: _contractspec_lib_schema293.SchemaModel<{
136
136
  success: {
137
- type: _contractspec_lib_schema194.FieldType<boolean, boolean>;
137
+ type: _contractspec_lib_schema293.FieldType<boolean, boolean>;
138
138
  isOptional: false;
139
139
  };
140
140
  }>;
141
141
  /**
142
142
  * Payload for project deleted event.
143
143
  */
144
- declare const ProjectDeletedPayloadModel: _contractspec_lib_schema194.SchemaModel<{
144
+ declare const ProjectDeletedPayloadModel: _contractspec_lib_schema293.SchemaModel<{
145
145
  projectId: {
146
- type: _contractspec_lib_schema194.FieldType<string, string>;
146
+ type: _contractspec_lib_schema293.FieldType<string, string>;
147
147
  isOptional: false;
148
148
  };
149
149
  }>;
150
150
  /**
151
151
  * Input for listing projects.
152
152
  */
153
- declare const ListProjectsInputModel: _contractspec_lib_schema194.SchemaModel<{
153
+ declare const ListProjectsInputModel: _contractspec_lib_schema293.SchemaModel<{
154
154
  status: {
155
- type: _contractspec_lib_schema194.EnumType<[string, string, string, string]>;
155
+ type: _contractspec_lib_schema293.EnumType<[string, string, string, string]>;
156
156
  isOptional: true;
157
157
  };
158
158
  search: {
159
- type: _contractspec_lib_schema194.FieldType<string, string>;
159
+ type: _contractspec_lib_schema293.FieldType<string, string>;
160
160
  isOptional: true;
161
161
  };
162
162
  limit: {
163
- type: _contractspec_lib_schema194.FieldType<number, number>;
163
+ type: _contractspec_lib_schema293.FieldType<number, number>;
164
164
  isOptional: true;
165
165
  defaultValue: number;
166
166
  };
167
167
  offset: {
168
- type: _contractspec_lib_schema194.FieldType<number, number>;
168
+ type: _contractspec_lib_schema293.FieldType<number, number>;
169
169
  isOptional: true;
170
170
  defaultValue: number;
171
171
  };
@@ -173,52 +173,52 @@ declare const ListProjectsInputModel: _contractspec_lib_schema194.SchemaModel<{
173
173
  /**
174
174
  * Output for listing projects.
175
175
  */
176
- declare const ListProjectsOutputModel: _contractspec_lib_schema194.SchemaModel<{
176
+ declare const ListProjectsOutputModel: _contractspec_lib_schema293.SchemaModel<{
177
177
  projects: {
178
- type: _contractspec_lib_schema194.SchemaModel<{
178
+ type: _contractspec_lib_schema293.SchemaModel<{
179
179
  id: {
180
- type: _contractspec_lib_schema194.FieldType<string, string>;
180
+ type: _contractspec_lib_schema293.FieldType<string, string>;
181
181
  isOptional: false;
182
182
  };
183
183
  name: {
184
- type: _contractspec_lib_schema194.FieldType<string, string>;
184
+ type: _contractspec_lib_schema293.FieldType<string, string>;
185
185
  isOptional: false;
186
186
  };
187
187
  description: {
188
- type: _contractspec_lib_schema194.FieldType<string, string>;
188
+ type: _contractspec_lib_schema293.FieldType<string, string>;
189
189
  isOptional: true;
190
190
  };
191
191
  slug: {
192
- type: _contractspec_lib_schema194.FieldType<string, string>;
192
+ type: _contractspec_lib_schema293.FieldType<string, string>;
193
193
  isOptional: true;
194
194
  };
195
195
  organizationId: {
196
- type: _contractspec_lib_schema194.FieldType<string, string>;
196
+ type: _contractspec_lib_schema293.FieldType<string, string>;
197
197
  isOptional: false;
198
198
  };
199
199
  createdBy: {
200
- type: _contractspec_lib_schema194.FieldType<string, string>;
200
+ type: _contractspec_lib_schema293.FieldType<string, string>;
201
201
  isOptional: false;
202
202
  };
203
203
  status: {
204
- type: _contractspec_lib_schema194.EnumType<[string, string, string, string]>;
204
+ type: _contractspec_lib_schema293.EnumType<[string, string, string, string]>;
205
205
  isOptional: false;
206
206
  };
207
207
  isPublic: {
208
- type: _contractspec_lib_schema194.FieldType<boolean, boolean>;
208
+ type: _contractspec_lib_schema293.FieldType<boolean, boolean>;
209
209
  isOptional: false;
210
210
  };
211
211
  tags: {
212
- type: _contractspec_lib_schema194.FieldType<string, string>;
212
+ type: _contractspec_lib_schema293.FieldType<string, string>;
213
213
  isArray: true;
214
214
  isOptional: false;
215
215
  };
216
216
  createdAt: {
217
- type: _contractspec_lib_schema194.FieldType<Date, string>;
217
+ type: _contractspec_lib_schema293.FieldType<Date, string>;
218
218
  isOptional: false;
219
219
  };
220
220
  updatedAt: {
221
- type: _contractspec_lib_schema194.FieldType<Date, string>;
221
+ type: _contractspec_lib_schema293.FieldType<Date, string>;
222
222
  isOptional: false;
223
223
  };
224
224
  }>;
@@ -226,7 +226,7 @@ declare const ListProjectsOutputModel: _contractspec_lib_schema194.SchemaModel<{
226
226
  isOptional: false;
227
227
  };
228
228
  total: {
229
- type: _contractspec_lib_schema194.FieldType<number, number>;
229
+ type: _contractspec_lib_schema293.FieldType<number, number>;
230
230
  isOptional: false;
231
231
  };
232
232
  }>;
@@ -1,4 +1,4 @@
1
- import { FeatureModuleSpec } from "@contractspec/lib.contracts";
1
+ import * as _contractspec_lib_contracts0 from "@contractspec/lib.contracts";
2
2
 
3
3
  //#region src/saas-boilerplate.feature.d.ts
4
4
 
@@ -6,7 +6,7 @@ import { FeatureModuleSpec } from "@contractspec/lib.contracts";
6
6
  * SaaS Boilerplate feature module that bundles project management,
7
7
  * billing, and settings operations into an installable feature.
8
8
  */
9
- declare const SaasBoilerplateFeature: FeatureModuleSpec;
9
+ declare const SaasBoilerplateFeature: _contractspec_lib_contracts0.FeatureModuleSpec;
10
10
  //#endregion
11
11
  export { SaasBoilerplateFeature };
12
12
  //# sourceMappingURL=saas-boilerplate.feature.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"saas-boilerplate.feature.d.ts","names":[],"sources":["../src/saas-boilerplate.feature.ts"],"sourcesContent":[],"mappings":";;;;;;;;cAWa,wBAAwB"}
1
+ {"version":3,"file":"saas-boilerplate.feature.d.ts","names":[],"sources":["../src/saas-boilerplate.feature.ts"],"sourcesContent":[],"mappings":";;;;;;;AAWA;cAAa,wBAqGX,4BAAA,CArGiC"}
@@ -1,9 +1,16 @@
1
+ import { defineFeature } from "@contractspec/lib.contracts";
2
+
1
3
  //#region src/saas-boilerplate.feature.ts
2
4
  /**
5
+ * SaaS Boilerplate Feature Module Specification
6
+ *
7
+ * Defines the feature module for the SaaS application foundation.
8
+ */
9
+ /**
3
10
  * SaaS Boilerplate feature module that bundles project management,
4
11
  * billing, and settings operations into an installable feature.
5
12
  */
6
- const SaasBoilerplateFeature = {
13
+ const SaasBoilerplateFeature = defineFeature({
7
14
  meta: {
8
15
  key: "saas-boilerplate",
9
16
  title: "SaaS Boilerplate",
@@ -194,7 +201,7 @@ const SaasBoilerplateFeature = {
194
201
  version: "1.0.0"
195
202
  }
196
203
  ] }
197
- };
204
+ });
198
205
 
199
206
  //#endregion
200
207
  export { SaasBoilerplateFeature };
@@ -1 +1 @@
1
- {"version":3,"file":"saas-boilerplate.feature.js","names":["SaasBoilerplateFeature: FeatureModuleSpec"],"sources":["../src/saas-boilerplate.feature.ts"],"sourcesContent":["/**\n * SaaS Boilerplate Feature Module Specification\n *\n * Defines the feature module for the SaaS application foundation.\n */\nimport type { FeatureModuleSpec } from '@contractspec/lib.contracts';\n\n/**\n * SaaS Boilerplate feature module that bundles project management,\n * billing, and settings operations into an installable feature.\n */\nexport const SaasBoilerplateFeature: FeatureModuleSpec = {\n meta: {\n key: 'saas-boilerplate',\n title: 'SaaS Boilerplate',\n description:\n 'SaaS application foundation with projects, billing, and settings',\n domain: 'saas',\n owners: ['@saas-team'],\n tags: ['saas', 'projects', 'billing'],\n stability: 'experimental',\n version: '1.0.0',\n },\n\n // All contract operations included in this feature\n operations: [\n // Project operations\n { key: 'saas.project.create', version: '1.0.0' },\n { key: 'saas.project.get', version: '1.0.0' },\n { key: 'saas.project.update', version: '1.0.0' },\n { key: 'saas.project.delete', version: '1.0.0' },\n { key: 'saas.project.list', version: '1.0.0' },\n\n // Billing operations\n { key: 'saas.billing.subscription.get', version: '1.0.0' },\n { key: 'saas.billing.usage.record', version: '1.0.0' },\n { key: 'saas.billing.usage.summary', version: '1.0.0' },\n { key: 'saas.billing.feature.check', version: '1.0.0' },\n ],\n\n // Events emitted by this feature\n events: [\n // Project events\n { key: 'project.created', version: '1.0.0' },\n { key: 'project.updated', version: '1.0.0' },\n { key: 'project.deleted', version: '1.0.0' },\n { key: 'project.archived', version: '1.0.0' },\n\n // Billing events\n { key: 'billing.usage.recorded', version: '1.0.0' },\n { key: 'billing.subscription.changed', version: '1.0.0' },\n { key: 'billing.limit.reached', version: '1.0.0' },\n ],\n\n // Presentations associated with this feature\n presentations: [\n { key: 'saas.dashboard', version: '1.0.0' },\n { key: 'saas.project.list', version: '1.0.0' },\n { key: 'saas.project.detail', version: '1.0.0' },\n { key: 'saas.billing.subscription', version: '1.0.0' },\n { key: 'saas.billing.usage', version: '1.0.0' },\n { key: 'saas.settings', version: '1.0.0' },\n ],\n\n // Link operations to their primary presentations\n opToPresentation: [\n {\n op: { key: 'saas.project.list', version: '1.0.0' },\n pres: { key: 'saas.project.list', version: '1.0.0' },\n },\n {\n op: { key: 'saas.project.get', version: '1.0.0' },\n pres: { key: 'saas.project.detail', version: '1.0.0' },\n },\n {\n op: { key: 'saas.billing.subscription.get', version: '1.0.0' },\n pres: { key: 'saas.billing.subscription', version: '1.0.0' },\n },\n {\n op: { key: 'saas.billing.usage.summary', version: '1.0.0' },\n pres: { key: 'saas.billing.usage', version: '1.0.0' },\n },\n ],\n\n // Target requirements for multi-surface rendering\n presentationsTargets: [\n { key: 'saas.dashboard', version: '1.0.0', targets: ['react', 'markdown'] },\n {\n key: 'saas.project.list',\n version: '1.0.0',\n targets: ['react', 'markdown', 'application/json'],\n },\n {\n key: 'saas.billing.subscription',\n version: '1.0.0',\n targets: ['react', 'markdown'],\n },\n {\n key: 'saas.billing.usage',\n version: '1.0.0',\n targets: ['react', 'markdown'],\n },\n ],\n\n // Capability requirements\n capabilities: {\n requires: [\n { key: 'identity', version: '1.0.0' },\n { key: 'audit-trail', version: '1.0.0' },\n { key: 'notifications', version: '1.0.0' },\n ],\n },\n};\n"],"mappings":";;;;;AAWA,MAAaA,yBAA4C;CACvD,MAAM;EACJ,KAAK;EACL,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,aAAa;EACtB,MAAM;GAAC;GAAQ;GAAY;GAAU;EACrC,WAAW;EACX,SAAS;EACV;CAGD,YAAY;EAEV;GAAE,KAAK;GAAuB,SAAS;GAAS;EAChD;GAAE,KAAK;GAAoB,SAAS;GAAS;EAC7C;GAAE,KAAK;GAAuB,SAAS;GAAS;EAChD;GAAE,KAAK;GAAuB,SAAS;GAAS;EAChD;GAAE,KAAK;GAAqB,SAAS;GAAS;EAG9C;GAAE,KAAK;GAAiC,SAAS;GAAS;EAC1D;GAAE,KAAK;GAA6B,SAAS;GAAS;EACtD;GAAE,KAAK;GAA8B,SAAS;GAAS;EACvD;GAAE,KAAK;GAA8B,SAAS;GAAS;EACxD;CAGD,QAAQ;EAEN;GAAE,KAAK;GAAmB,SAAS;GAAS;EAC5C;GAAE,KAAK;GAAmB,SAAS;GAAS;EAC5C;GAAE,KAAK;GAAmB,SAAS;GAAS;EAC5C;GAAE,KAAK;GAAoB,SAAS;GAAS;EAG7C;GAAE,KAAK;GAA0B,SAAS;GAAS;EACnD;GAAE,KAAK;GAAgC,SAAS;GAAS;EACzD;GAAE,KAAK;GAAyB,SAAS;GAAS;EACnD;CAGD,eAAe;EACb;GAAE,KAAK;GAAkB,SAAS;GAAS;EAC3C;GAAE,KAAK;GAAqB,SAAS;GAAS;EAC9C;GAAE,KAAK;GAAuB,SAAS;GAAS;EAChD;GAAE,KAAK;GAA6B,SAAS;GAAS;EACtD;GAAE,KAAK;GAAsB,SAAS;GAAS;EAC/C;GAAE,KAAK;GAAiB,SAAS;GAAS;EAC3C;CAGD,kBAAkB;EAChB;GACE,IAAI;IAAE,KAAK;IAAqB,SAAS;IAAS;GAClD,MAAM;IAAE,KAAK;IAAqB,SAAS;IAAS;GACrD;EACD;GACE,IAAI;IAAE,KAAK;IAAoB,SAAS;IAAS;GACjD,MAAM;IAAE,KAAK;IAAuB,SAAS;IAAS;GACvD;EACD;GACE,IAAI;IAAE,KAAK;IAAiC,SAAS;IAAS;GAC9D,MAAM;IAAE,KAAK;IAA6B,SAAS;IAAS;GAC7D;EACD;GACE,IAAI;IAAE,KAAK;IAA8B,SAAS;IAAS;GAC3D,MAAM;IAAE,KAAK;IAAsB,SAAS;IAAS;GACtD;EACF;CAGD,sBAAsB;EACpB;GAAE,KAAK;GAAkB,SAAS;GAAS,SAAS,CAAC,SAAS,WAAW;GAAE;EAC3E;GACE,KAAK;GACL,SAAS;GACT,SAAS;IAAC;IAAS;IAAY;IAAmB;GACnD;EACD;GACE,KAAK;GACL,SAAS;GACT,SAAS,CAAC,SAAS,WAAW;GAC/B;EACD;GACE,KAAK;GACL,SAAS;GACT,SAAS,CAAC,SAAS,WAAW;GAC/B;EACF;CAGD,cAAc,EACZ,UAAU;EACR;GAAE,KAAK;GAAY,SAAS;GAAS;EACrC;GAAE,KAAK;GAAe,SAAS;GAAS;EACxC;GAAE,KAAK;GAAiB,SAAS;GAAS;EAC3C,EACF;CACF"}
1
+ {"version":3,"file":"saas-boilerplate.feature.js","names":[],"sources":["../src/saas-boilerplate.feature.ts"],"sourcesContent":["/**\n * SaaS Boilerplate Feature Module Specification\n *\n * Defines the feature module for the SaaS application foundation.\n */\nimport { defineFeature } from '@contractspec/lib.contracts';\n\n/**\n * SaaS Boilerplate feature module that bundles project management,\n * billing, and settings operations into an installable feature.\n */\nexport const SaasBoilerplateFeature = defineFeature({\n meta: {\n key: 'saas-boilerplate',\n title: 'SaaS Boilerplate',\n description:\n 'SaaS application foundation with projects, billing, and settings',\n domain: 'saas',\n owners: ['@saas-team'],\n tags: ['saas', 'projects', 'billing'],\n stability: 'experimental',\n version: '1.0.0',\n },\n\n // All contract operations included in this feature\n operations: [\n // Project operations\n { key: 'saas.project.create', version: '1.0.0' },\n { key: 'saas.project.get', version: '1.0.0' },\n { key: 'saas.project.update', version: '1.0.0' },\n { key: 'saas.project.delete', version: '1.0.0' },\n { key: 'saas.project.list', version: '1.0.0' },\n\n // Billing operations\n { key: 'saas.billing.subscription.get', version: '1.0.0' },\n { key: 'saas.billing.usage.record', version: '1.0.0' },\n { key: 'saas.billing.usage.summary', version: '1.0.0' },\n { key: 'saas.billing.feature.check', version: '1.0.0' },\n ],\n\n // Events emitted by this feature\n events: [\n // Project events\n { key: 'project.created', version: '1.0.0' },\n { key: 'project.updated', version: '1.0.0' },\n { key: 'project.deleted', version: '1.0.0' },\n { key: 'project.archived', version: '1.0.0' },\n\n // Billing events\n { key: 'billing.usage.recorded', version: '1.0.0' },\n { key: 'billing.subscription.changed', version: '1.0.0' },\n { key: 'billing.limit.reached', version: '1.0.0' },\n ],\n\n // Presentations associated with this feature\n presentations: [\n { key: 'saas.dashboard', version: '1.0.0' },\n { key: 'saas.project.list', version: '1.0.0' },\n { key: 'saas.project.detail', version: '1.0.0' },\n { key: 'saas.billing.subscription', version: '1.0.0' },\n { key: 'saas.billing.usage', version: '1.0.0' },\n { key: 'saas.settings', version: '1.0.0' },\n ],\n\n // Link operations to their primary presentations\n opToPresentation: [\n {\n op: { key: 'saas.project.list', version: '1.0.0' },\n pres: { key: 'saas.project.list', version: '1.0.0' },\n },\n {\n op: { key: 'saas.project.get', version: '1.0.0' },\n pres: { key: 'saas.project.detail', version: '1.0.0' },\n },\n {\n op: { key: 'saas.billing.subscription.get', version: '1.0.0' },\n pres: { key: 'saas.billing.subscription', version: '1.0.0' },\n },\n {\n op: { key: 'saas.billing.usage.summary', version: '1.0.0' },\n pres: { key: 'saas.billing.usage', version: '1.0.0' },\n },\n ],\n\n // Target requirements for multi-surface rendering\n presentationsTargets: [\n { key: 'saas.dashboard', version: '1.0.0', targets: ['react', 'markdown'] },\n {\n key: 'saas.project.list',\n version: '1.0.0',\n targets: ['react', 'markdown', 'application/json'],\n },\n {\n key: 'saas.billing.subscription',\n version: '1.0.0',\n targets: ['react', 'markdown'],\n },\n {\n key: 'saas.billing.usage',\n version: '1.0.0',\n targets: ['react', 'markdown'],\n },\n ],\n\n // Capability requirements\n capabilities: {\n requires: [\n { key: 'identity', version: '1.0.0' },\n { key: 'audit-trail', version: '1.0.0' },\n { key: 'notifications', version: '1.0.0' },\n ],\n },\n});\n"],"mappings":";;;;;;;;;;;;AAWA,MAAa,yBAAyB,cAAc;CAClD,MAAM;EACJ,KAAK;EACL,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,aAAa;EACtB,MAAM;GAAC;GAAQ;GAAY;GAAU;EACrC,WAAW;EACX,SAAS;EACV;CAGD,YAAY;EAEV;GAAE,KAAK;GAAuB,SAAS;GAAS;EAChD;GAAE,KAAK;GAAoB,SAAS;GAAS;EAC7C;GAAE,KAAK;GAAuB,SAAS;GAAS;EAChD;GAAE,KAAK;GAAuB,SAAS;GAAS;EAChD;GAAE,KAAK;GAAqB,SAAS;GAAS;EAG9C;GAAE,KAAK;GAAiC,SAAS;GAAS;EAC1D;GAAE,KAAK;GAA6B,SAAS;GAAS;EACtD;GAAE,KAAK;GAA8B,SAAS;GAAS;EACvD;GAAE,KAAK;GAA8B,SAAS;GAAS;EACxD;CAGD,QAAQ;EAEN;GAAE,KAAK;GAAmB,SAAS;GAAS;EAC5C;GAAE,KAAK;GAAmB,SAAS;GAAS;EAC5C;GAAE,KAAK;GAAmB,SAAS;GAAS;EAC5C;GAAE,KAAK;GAAoB,SAAS;GAAS;EAG7C;GAAE,KAAK;GAA0B,SAAS;GAAS;EACnD;GAAE,KAAK;GAAgC,SAAS;GAAS;EACzD;GAAE,KAAK;GAAyB,SAAS;GAAS;EACnD;CAGD,eAAe;EACb;GAAE,KAAK;GAAkB,SAAS;GAAS;EAC3C;GAAE,KAAK;GAAqB,SAAS;GAAS;EAC9C;GAAE,KAAK;GAAuB,SAAS;GAAS;EAChD;GAAE,KAAK;GAA6B,SAAS;GAAS;EACtD;GAAE,KAAK;GAAsB,SAAS;GAAS;EAC/C;GAAE,KAAK;GAAiB,SAAS;GAAS;EAC3C;CAGD,kBAAkB;EAChB;GACE,IAAI;IAAE,KAAK;IAAqB,SAAS;IAAS;GAClD,MAAM;IAAE,KAAK;IAAqB,SAAS;IAAS;GACrD;EACD;GACE,IAAI;IAAE,KAAK;IAAoB,SAAS;IAAS;GACjD,MAAM;IAAE,KAAK;IAAuB,SAAS;IAAS;GACvD;EACD;GACE,IAAI;IAAE,KAAK;IAAiC,SAAS;IAAS;GAC9D,MAAM;IAAE,KAAK;IAA6B,SAAS;IAAS;GAC7D;EACD;GACE,IAAI;IAAE,KAAK;IAA8B,SAAS;IAAS;GAC3D,MAAM;IAAE,KAAK;IAAsB,SAAS;IAAS;GACtD;EACF;CAGD,sBAAsB;EACpB;GAAE,KAAK;GAAkB,SAAS;GAAS,SAAS,CAAC,SAAS,WAAW;GAAE;EAC3E;GACE,KAAK;GACL,SAAS;GACT,SAAS;IAAC;IAAS;IAAY;IAAmB;GACnD;EACD;GACE,KAAK;GACL,SAAS;GACT,SAAS,CAAC,SAAS,WAAW;GAC/B;EACD;GACE,KAAK;GACL,SAAS;GACT,SAAS,CAAC,SAAS,WAAW;GAC/B;EACF;CAGD,cAAc,EACZ,UAAU;EACR;GAAE,KAAK;GAAY,SAAS;GAAS;EACrC;GAAE,KAAK;GAAe,SAAS;GAAS;EACxC;GAAE,KAAK;GAAiB,SAAS;GAAS;EAC3C,EACF;CACF,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { DatabasePort } from "@contractspec/lib.runtime-sandbox";
2
+
3
+ //#region src/seeders/index.d.ts
4
+ declare function seedSaasBoilerplate(params: {
5
+ projectId: string;
6
+ db: DatabasePort;
7
+ }): Promise<void>;
8
+ //#endregion
9
+ export { seedSaasBoilerplate };
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/seeders/index.ts"],"sourcesContent":[],"mappings":";;;iBAEsB,mBAAA;;EAAA,EAAA,EAEhB,YAFgB;IAGrB"}
@@ -0,0 +1,19 @@
1
+ //#region src/seeders/index.ts
2
+ async function seedSaasBoilerplate(params) {
3
+ const { projectId, db } = params;
4
+ if ((await db.query(`SELECT COUNT(*) as count FROM saas_project WHERE "projectId" = $1`, [projectId])).rows[0]?.count > 0) return;
5
+ await db.execute(`INSERT INTO saas_project (id, "projectId", "organizationId", name, description, status, tier)
6
+ VALUES ($1, $2, $3, $4, $5, $6, $7)`, [
7
+ "saas_proj_1",
8
+ projectId,
9
+ "org_demo",
10
+ "Demo Project",
11
+ "A demo SaaS project",
12
+ "ACTIVE",
13
+ "PRO"
14
+ ]);
15
+ }
16
+
17
+ //#endregion
18
+ export { seedSaasBoilerplate };
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/seeders/index.ts"],"sourcesContent":["import type { DatabasePort } from '@contractspec/lib.runtime-sandbox';\n\nexport async function seedSaasBoilerplate(params: {\n projectId: string;\n db: DatabasePort;\n}) {\n const { projectId, db } = params;\n\n const existing = await db.query(\n `SELECT COUNT(*) as count FROM saas_project WHERE \"projectId\" = $1`,\n [projectId]\n );\n if ((existing.rows[0]?.count as number) > 0) return;\n\n await db.execute(\n `INSERT INTO saas_project (id, \"projectId\", \"organizationId\", name, description, status, tier)\n VALUES ($1, $2, $3, $4, $5, $6, $7)`,\n [\n 'saas_proj_1',\n projectId,\n 'org_demo',\n 'Demo Project',\n 'A demo SaaS project',\n 'ACTIVE',\n 'PRO',\n ]\n );\n}\n"],"mappings":";AAEA,eAAsB,oBAAoB,QAGvC;CACD,MAAM,EAAE,WAAW,OAAO;AAM1B,MAJiB,MAAM,GAAG,MACxB,qEACA,CAAC,UAAU,CACZ,EACa,KAAK,IAAI,QAAmB,EAAG;AAE7C,OAAM,GAAG,QACP;2CAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CACF"}
@@ -1,36 +1,36 @@
1
- import * as _contractspec_lib_schema170 from "@contractspec/lib.schema";
1
+ import * as _contractspec_lib_schema346 from "@contractspec/lib.schema";
2
2
 
3
3
  //#region src/settings/settings.entity.d.ts
4
4
  /**
5
5
  * Settings entity - key-value configuration store.
6
6
  */
7
- declare const SettingsEntity: _contractspec_lib_schema170.EntitySpec<{
8
- id: _contractspec_lib_schema170.EntityScalarField;
9
- key: _contractspec_lib_schema170.EntityScalarField;
10
- scope: _contractspec_lib_schema170.EntityEnumField;
11
- scopeId: _contractspec_lib_schema170.EntityScalarField;
12
- value: _contractspec_lib_schema170.EntityScalarField;
13
- valueType: _contractspec_lib_schema170.EntityScalarField;
14
- schema: _contractspec_lib_schema170.EntityScalarField;
15
- description: _contractspec_lib_schema170.EntityScalarField;
16
- isSecret: _contractspec_lib_schema170.EntityScalarField;
17
- createdAt: _contractspec_lib_schema170.EntityScalarField;
18
- updatedAt: _contractspec_lib_schema170.EntityScalarField;
7
+ declare const SettingsEntity: _contractspec_lib_schema346.EntitySpec<{
8
+ id: _contractspec_lib_schema346.EntityScalarField;
9
+ key: _contractspec_lib_schema346.EntityScalarField;
10
+ scope: _contractspec_lib_schema346.EntityEnumField;
11
+ scopeId: _contractspec_lib_schema346.EntityScalarField;
12
+ value: _contractspec_lib_schema346.EntityScalarField;
13
+ valueType: _contractspec_lib_schema346.EntityScalarField;
14
+ schema: _contractspec_lib_schema346.EntityScalarField;
15
+ description: _contractspec_lib_schema346.EntityScalarField;
16
+ isSecret: _contractspec_lib_schema346.EntityScalarField;
17
+ createdAt: _contractspec_lib_schema346.EntityScalarField;
18
+ updatedAt: _contractspec_lib_schema346.EntityScalarField;
19
19
  }>;
20
20
  /**
21
21
  * FeatureFlag entity - feature toggles.
22
22
  */
23
- declare const FeatureFlagEntity: _contractspec_lib_schema170.EntitySpec<{
24
- id: _contractspec_lib_schema170.EntityScalarField;
25
- key: _contractspec_lib_schema170.EntityScalarField;
26
- name: _contractspec_lib_schema170.EntityScalarField;
27
- description: _contractspec_lib_schema170.EntityScalarField;
28
- enabled: _contractspec_lib_schema170.EntityScalarField;
29
- defaultValue: _contractspec_lib_schema170.EntityScalarField;
30
- rules: _contractspec_lib_schema170.EntityScalarField;
31
- rolloutPercentage: _contractspec_lib_schema170.EntityScalarField;
32
- createdAt: _contractspec_lib_schema170.EntityScalarField;
33
- updatedAt: _contractspec_lib_schema170.EntityScalarField;
23
+ declare const FeatureFlagEntity: _contractspec_lib_schema346.EntitySpec<{
24
+ id: _contractspec_lib_schema346.EntityScalarField;
25
+ key: _contractspec_lib_schema346.EntityScalarField;
26
+ name: _contractspec_lib_schema346.EntityScalarField;
27
+ description: _contractspec_lib_schema346.EntityScalarField;
28
+ enabled: _contractspec_lib_schema346.EntityScalarField;
29
+ defaultValue: _contractspec_lib_schema346.EntityScalarField;
30
+ rules: _contractspec_lib_schema346.EntityScalarField;
31
+ rolloutPercentage: _contractspec_lib_schema346.EntityScalarField;
32
+ createdAt: _contractspec_lib_schema346.EntityScalarField;
33
+ updatedAt: _contractspec_lib_schema346.EntityScalarField;
34
34
  }>;
35
35
  //#endregion
36
36
  export { FeatureFlagEntity, SettingsEntity };
@@ -1,10 +1,10 @@
1
- import * as _contractspec_lib_schema193 from "@contractspec/lib.schema";
1
+ import * as _contractspec_lib_schema369 from "@contractspec/lib.schema";
2
2
 
3
3
  //#region src/settings/settings.enum.d.ts
4
4
  /**
5
5
  * Settings scope enum.
6
6
  */
7
- declare const SettingsScopeEnum: _contractspec_lib_schema193.EntityEnumDef;
7
+ declare const SettingsScopeEnum: _contractspec_lib_schema369.EntityEnumDef;
8
8
  //#endregion
9
9
  export { SettingsScopeEnum };
10
10
  //# sourceMappingURL=settings.enum.d.ts.map
@@ -0,0 +1,34 @@
1
+ //#region src/shared/overlay-types.d.ts
2
+ interface OverlayDefinition {
3
+ overlayId: string;
4
+ version: string;
5
+ description: string;
6
+ appliesTo: Record<string, string>;
7
+ modifications: OverlayModification[];
8
+ }
9
+ type OverlayModification = HideFieldModification | RenameLabelModification | AddBadgeModification | SetLimitModification;
10
+ interface HideFieldModification {
11
+ type: 'hideField';
12
+ field: string;
13
+ reason?: string;
14
+ }
15
+ interface RenameLabelModification {
16
+ type: 'renameLabel';
17
+ field: string;
18
+ newLabel: string;
19
+ }
20
+ interface AddBadgeModification {
21
+ type: 'addBadge';
22
+ position: 'header' | 'footer';
23
+ label: string;
24
+ variant: 'warning' | 'info' | 'error' | 'success' | 'default';
25
+ }
26
+ interface SetLimitModification {
27
+ type: 'setLimit';
28
+ field: string;
29
+ max: number;
30
+ message: string;
31
+ }
32
+ //#endregion
33
+ export { AddBadgeModification, HideFieldModification, OverlayDefinition, OverlayModification, RenameLabelModification, SetLimitModification };
34
+ //# sourceMappingURL=overlay-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"overlay-types.d.ts","names":[],"sources":["../../src/shared/overlay-types.ts"],"sourcesContent":[],"mappings":";UAAiB,iBAAA;EAAA,SAAA,EAAA,MAAA;EAQL,OAAA,EAAA,MAAA;EACR,WAAA,EAAA,MAAA;EACA,SAAA,EANS,MAMT,CAAA,MAAA,EAAA,MAAA,CAAA;EACA,aAAA,EANa,mBAMb,EAAA;;AACoB,KAJZ,mBAAA,GACR,qBAGoB,GAFpB,uBAEoB,GADpB,oBACoB,GAApB,oBAAoB;AAEP,UAAA,qBAAA,CAAqB;EAMrB,IAAA,EAAA,WAAA;EAMA,KAAA,EAAA,MAAA;EAOA,MAAA,CAAA,EAAA,MAAA;;UAbA,uBAAA;;;;;UAMA,oBAAA;;;;;;UAOA,oBAAA"}
File without changes
@@ -0,0 +1,10 @@
1
+ import * as _contractspec_lib_contracts23 from "@contractspec/lib.contracts";
2
+
3
+ //#region src/tests/operations.test-spec.d.ts
4
+ declare const ProjectListTest: _contractspec_lib_contracts23.TestSpec;
5
+ declare const ProjectGetTest: _contractspec_lib_contracts23.TestSpec;
6
+ declare const BillingSubscriptionGetTest: _contractspec_lib_contracts23.TestSpec;
7
+ declare const BillingUsageSummaryTest: _contractspec_lib_contracts23.TestSpec;
8
+ //#endregion
9
+ export { BillingSubscriptionGetTest, BillingUsageSummaryTest, ProjectGetTest, ProjectListTest };
10
+ //# sourceMappingURL=operations.test-spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operations.test-spec.d.ts","names":[],"sources":["../../src/tests/operations.test-spec.ts"],"sourcesContent":[],"mappings":";;;cAEa,iBAyBX,6BAAA,CAzB0B;cA2Bf,gBAyBX,6BAAA,CAzByB;cA2Bd,4BAyBX,6BAAA,CAzBqC;AAtD1B,cAiFA,uBAxDX,EAiFA,6BAAA,CAzBkC,QAxDlC"}
@@ -0,0 +1,123 @@
1
+ import { defineTestSpec } from "@contractspec/lib.contracts";
2
+
3
+ //#region src/tests/operations.test-spec.ts
4
+ const ProjectListTest = defineTestSpec({
5
+ meta: {
6
+ key: "saas.project.list.test",
7
+ version: "1.0.0",
8
+ stability: "experimental",
9
+ owners: ["@example.saas-boilerplate"],
10
+ description: "Test for listing projects",
11
+ tags: ["test"]
12
+ },
13
+ target: {
14
+ type: "operation",
15
+ operation: {
16
+ key: "saas.project.list",
17
+ version: "1.0.0"
18
+ }
19
+ },
20
+ scenarios: [{
21
+ key: "success",
22
+ when: { operation: { key: "saas.project.list" } },
23
+ then: [{
24
+ type: "expectOutput",
25
+ match: {}
26
+ }]
27
+ }, {
28
+ key: "error",
29
+ when: { operation: { key: "saas.project.list" } },
30
+ then: [{ type: "expectError" }]
31
+ }]
32
+ });
33
+ const ProjectGetTest = defineTestSpec({
34
+ meta: {
35
+ key: "saas.project.get.test",
36
+ version: "1.0.0",
37
+ stability: "experimental",
38
+ owners: ["@example.saas-boilerplate"],
39
+ description: "Test for getting project",
40
+ tags: ["test"]
41
+ },
42
+ target: {
43
+ type: "operation",
44
+ operation: {
45
+ key: "saas.project.get",
46
+ version: "1.0.0"
47
+ }
48
+ },
49
+ scenarios: [{
50
+ key: "success",
51
+ when: { operation: { key: "saas.project.get" } },
52
+ then: [{
53
+ type: "expectOutput",
54
+ match: {}
55
+ }]
56
+ }, {
57
+ key: "error",
58
+ when: { operation: { key: "saas.project.get" } },
59
+ then: [{ type: "expectError" }]
60
+ }]
61
+ });
62
+ const BillingSubscriptionGetTest = defineTestSpec({
63
+ meta: {
64
+ key: "saas.billing.subscription.get.test",
65
+ version: "1.0.0",
66
+ stability: "experimental",
67
+ owners: ["@example.saas-boilerplate"],
68
+ description: "Test for getting subscription",
69
+ tags: ["test"]
70
+ },
71
+ target: {
72
+ type: "operation",
73
+ operation: {
74
+ key: "saas.billing.subscription.get",
75
+ version: "1.0.0"
76
+ }
77
+ },
78
+ scenarios: [{
79
+ key: "success",
80
+ when: { operation: { key: "saas.billing.subscription.get" } },
81
+ then: [{
82
+ type: "expectOutput",
83
+ match: {}
84
+ }]
85
+ }, {
86
+ key: "error",
87
+ when: { operation: { key: "saas.billing.subscription.get" } },
88
+ then: [{ type: "expectError" }]
89
+ }]
90
+ });
91
+ const BillingUsageSummaryTest = defineTestSpec({
92
+ meta: {
93
+ key: "saas.billing.usage.summary.test",
94
+ version: "1.0.0",
95
+ stability: "experimental",
96
+ owners: ["@example.saas-boilerplate"],
97
+ description: "Test for getting usage summary",
98
+ tags: ["test"]
99
+ },
100
+ target: {
101
+ type: "operation",
102
+ operation: {
103
+ key: "saas.billing.usage.summary",
104
+ version: "1.0.0"
105
+ }
106
+ },
107
+ scenarios: [{
108
+ key: "success",
109
+ when: { operation: { key: "saas.billing.usage.summary" } },
110
+ then: [{
111
+ type: "expectOutput",
112
+ match: {}
113
+ }]
114
+ }, {
115
+ key: "error",
116
+ when: { operation: { key: "saas.billing.usage.summary" } },
117
+ then: [{ type: "expectError" }]
118
+ }]
119
+ });
120
+
121
+ //#endregion
122
+ export { BillingSubscriptionGetTest, BillingUsageSummaryTest, ProjectGetTest, ProjectListTest };
123
+ //# sourceMappingURL=operations.test-spec.js.map