@contractspec/example.saas-boilerplate 1.56.1 → 1.58.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 (284) hide show
  1. package/.turbo/turbo-build.log +160 -188
  2. package/.turbo/turbo-prebuild.log +1 -0
  3. package/CHANGELOG.md +45 -0
  4. package/dist/billing/billing.entity.d.ts +40 -45
  5. package/dist/billing/billing.entity.d.ts.map +1 -1
  6. package/dist/billing/billing.entity.js +110 -118
  7. package/dist/billing/billing.enum.d.ts +2 -8
  8. package/dist/billing/billing.enum.d.ts.map +1 -1
  9. package/dist/billing/billing.enum.js +17 -24
  10. package/dist/billing/billing.event.d.ts +67 -73
  11. package/dist/billing/billing.event.d.ts.map +1 -1
  12. package/dist/billing/billing.event.js +84 -146
  13. package/dist/billing/billing.handler.d.ts +59 -62
  14. package/dist/billing/billing.handler.d.ts.map +1 -1
  15. package/dist/billing/billing.handler.js +140 -49
  16. package/dist/billing/billing.operations.d.ts +138 -144
  17. package/dist/billing/billing.operations.d.ts.map +1 -1
  18. package/dist/billing/billing.operations.js +273 -175
  19. package/dist/billing/billing.presentation.d.ts +2 -7
  20. package/dist/billing/billing.presentation.d.ts.map +1 -1
  21. package/dist/billing/billing.presentation.js +51 -57
  22. package/dist/billing/billing.schema.d.ts +159 -164
  23. package/dist/billing/billing.schema.d.ts.map +1 -1
  24. package/dist/billing/billing.schema.js +112 -204
  25. package/dist/billing/index.d.ts +11 -8
  26. package/dist/billing/index.d.ts.map +1 -0
  27. package/dist/billing/index.js +689 -9
  28. package/dist/browser/billing/billing.entity.js +113 -0
  29. package/dist/browser/billing/billing.enum.js +19 -0
  30. package/dist/browser/billing/billing.event.js +90 -0
  31. package/dist/browser/billing/billing.handler.js +148 -0
  32. package/dist/browser/billing/billing.operations.js +278 -0
  33. package/dist/browser/billing/billing.presentation.js +52 -0
  34. package/dist/browser/billing/billing.schema.js +121 -0
  35. package/dist/browser/billing/index.js +688 -0
  36. package/dist/browser/dashboard/dashboard.presentation.js +52 -0
  37. package/dist/browser/dashboard/index.js +52 -0
  38. package/dist/browser/docs/index.js +93 -0
  39. package/dist/browser/docs/saas-boilerplate.docblock.js +93 -0
  40. package/dist/browser/example.js +39 -0
  41. package/dist/browser/handlers/index.js +358 -0
  42. package/dist/browser/handlers/saas.handlers.js +134 -0
  43. package/dist/browser/index.js +3340 -0
  44. package/dist/browser/presentations/index.js +290 -0
  45. package/dist/browser/project/index.js +790 -0
  46. package/dist/browser/project/project.entity.js +77 -0
  47. package/dist/browser/project/project.enum.js +18 -0
  48. package/dist/browser/project/project.event.js +103 -0
  49. package/dist/browser/project/project.handler.js +178 -0
  50. package/dist/browser/project/project.operations.js +372 -0
  51. package/dist/browser/project/project.presentation.js +177 -0
  52. package/dist/browser/project/project.schema.js +134 -0
  53. package/dist/browser/saas-boilerplate.feature.js +88 -0
  54. package/dist/browser/seeders/index.js +20 -0
  55. package/dist/browser/settings/index.js +75 -0
  56. package/dist/browser/settings/settings.entity.js +74 -0
  57. package/dist/browser/settings/settings.enum.js +11 -0
  58. package/dist/browser/shared/mock-data.js +104 -0
  59. package/dist/browser/shared/overlay-types.js +0 -0
  60. package/dist/browser/tests/operations.test-spec.js +112 -0
  61. package/dist/browser/ui/SaasDashboard.js +988 -0
  62. package/dist/browser/ui/SaasProjectList.js +162 -0
  63. package/dist/browser/ui/SaasSettingsPanel.js +145 -0
  64. package/dist/browser/ui/hooks/index.js +159 -0
  65. package/dist/browser/ui/hooks/useProjectList.js +66 -0
  66. package/dist/browser/ui/hooks/useProjectMutations.js +91 -0
  67. package/dist/browser/ui/index.js +1808 -0
  68. package/dist/browser/ui/modals/CreateProjectModal.js +153 -0
  69. package/dist/browser/ui/modals/ProjectActionsModal.js +335 -0
  70. package/dist/browser/ui/modals/index.js +487 -0
  71. package/dist/browser/ui/overlays/demo-overlays.js +61 -0
  72. package/dist/browser/ui/overlays/index.js +61 -0
  73. package/dist/browser/ui/renderers/index.js +675 -0
  74. package/dist/browser/ui/renderers/project-list.markdown.js +499 -0
  75. package/dist/browser/ui/renderers/project-list.renderer.js +177 -0
  76. package/dist/dashboard/dashboard.presentation.d.ts +2 -7
  77. package/dist/dashboard/dashboard.presentation.d.ts.map +1 -1
  78. package/dist/dashboard/dashboard.presentation.js +51 -53
  79. package/dist/dashboard/index.d.ts +5 -2
  80. package/dist/dashboard/index.d.ts.map +1 -0
  81. package/dist/dashboard/index.js +53 -3
  82. package/dist/docs/index.d.ts +2 -1
  83. package/dist/docs/index.d.ts.map +1 -0
  84. package/dist/docs/index.js +94 -1
  85. package/dist/docs/saas-boilerplate.docblock.d.ts +2 -1
  86. package/dist/docs/saas-boilerplate.docblock.d.ts.map +1 -0
  87. package/dist/docs/saas-boilerplate.docblock.js +45 -51
  88. package/dist/example.d.ts +2 -6
  89. package/dist/example.d.ts.map +1 -1
  90. package/dist/example.js +37 -50
  91. package/dist/handlers/index.d.ts +7 -4
  92. package/dist/handlers/index.d.ts.map +1 -0
  93. package/dist/handlers/index.js +358 -4
  94. package/dist/handlers/saas.handlers.d.ts +60 -60
  95. package/dist/handlers/saas.handlers.d.ts.map +1 -1
  96. package/dist/handlers/saas.handlers.js +127 -140
  97. package/dist/index.d.ts +15 -45
  98. package/dist/index.d.ts.map +1 -1
  99. package/dist/index.js +3335 -75
  100. package/dist/node/billing/billing.entity.js +113 -0
  101. package/dist/node/billing/billing.enum.js +19 -0
  102. package/dist/node/billing/billing.event.js +90 -0
  103. package/dist/node/billing/billing.handler.js +148 -0
  104. package/dist/node/billing/billing.operations.js +278 -0
  105. package/dist/node/billing/billing.presentation.js +52 -0
  106. package/dist/node/billing/billing.schema.js +121 -0
  107. package/dist/node/billing/index.js +688 -0
  108. package/dist/node/dashboard/dashboard.presentation.js +52 -0
  109. package/dist/node/dashboard/index.js +52 -0
  110. package/dist/node/docs/index.js +93 -0
  111. package/dist/node/docs/saas-boilerplate.docblock.js +93 -0
  112. package/dist/node/example.js +39 -0
  113. package/dist/node/handlers/index.js +358 -0
  114. package/dist/node/handlers/saas.handlers.js +134 -0
  115. package/dist/node/index.js +3340 -0
  116. package/dist/node/presentations/index.js +290 -0
  117. package/dist/node/project/index.js +790 -0
  118. package/dist/node/project/project.entity.js +77 -0
  119. package/dist/node/project/project.enum.js +18 -0
  120. package/dist/node/project/project.event.js +103 -0
  121. package/dist/node/project/project.handler.js +178 -0
  122. package/dist/node/project/project.operations.js +372 -0
  123. package/dist/node/project/project.presentation.js +177 -0
  124. package/dist/node/project/project.schema.js +134 -0
  125. package/dist/node/saas-boilerplate.feature.js +88 -0
  126. package/dist/node/seeders/index.js +20 -0
  127. package/dist/node/settings/index.js +75 -0
  128. package/dist/node/settings/settings.entity.js +74 -0
  129. package/dist/node/settings/settings.enum.js +11 -0
  130. package/dist/node/shared/mock-data.js +104 -0
  131. package/dist/node/shared/overlay-types.js +0 -0
  132. package/dist/node/tests/operations.test-spec.js +112 -0
  133. package/dist/node/ui/SaasDashboard.js +988 -0
  134. package/dist/node/ui/SaasProjectList.js +162 -0
  135. package/dist/node/ui/SaasSettingsPanel.js +145 -0
  136. package/dist/node/ui/hooks/index.js +159 -0
  137. package/dist/node/ui/hooks/useProjectList.js +66 -0
  138. package/dist/node/ui/hooks/useProjectMutations.js +91 -0
  139. package/dist/node/ui/index.js +1808 -0
  140. package/dist/node/ui/modals/CreateProjectModal.js +153 -0
  141. package/dist/node/ui/modals/ProjectActionsModal.js +335 -0
  142. package/dist/node/ui/modals/index.js +487 -0
  143. package/dist/node/ui/overlays/demo-overlays.js +61 -0
  144. package/dist/node/ui/overlays/index.js +61 -0
  145. package/dist/node/ui/renderers/index.js +675 -0
  146. package/dist/node/ui/renderers/project-list.markdown.js +499 -0
  147. package/dist/node/ui/renderers/project-list.renderer.js +177 -0
  148. package/dist/presentations/index.d.ts +13 -15
  149. package/dist/presentations/index.d.ts.map +1 -1
  150. package/dist/presentations/index.js +289 -15
  151. package/dist/project/index.d.ts +11 -8
  152. package/dist/project/index.d.ts.map +1 -0
  153. package/dist/project/index.js +791 -9
  154. package/dist/project/project.entity.d.ts +23 -28
  155. package/dist/project/project.entity.d.ts.map +1 -1
  156. package/dist/project/project.entity.js +75 -82
  157. package/dist/project/project.enum.d.ts +2 -8
  158. package/dist/project/project.enum.d.ts.map +1 -1
  159. package/dist/project/project.enum.js +16 -23
  160. package/dist/project/project.event.d.ts +69 -75
  161. package/dist/project/project.event.d.ts.map +1 -1
  162. package/dist/project/project.event.js +95 -156
  163. package/dist/project/project.handler.d.ts +44 -47
  164. package/dist/project/project.handler.d.ts.map +1 -1
  165. package/dist/project/project.handler.js +168 -71
  166. package/dist/project/project.operations.d.ts +341 -347
  167. package/dist/project/project.operations.d.ts.map +1 -1
  168. package/dist/project/project.operations.js +366 -253
  169. package/dist/project/project.presentation.d.ts +2 -7
  170. package/dist/project/project.presentation.d.ts.map +1 -1
  171. package/dist/project/project.presentation.js +174 -61
  172. package/dist/project/project.schema.d.ts +191 -196
  173. package/dist/project/project.schema.d.ts.map +1 -1
  174. package/dist/project/project.schema.js +125 -205
  175. package/dist/saas-boilerplate.feature.d.ts +1 -7
  176. package/dist/saas-boilerplate.feature.d.ts.map +1 -1
  177. package/dist/saas-boilerplate.feature.js +87 -206
  178. package/dist/seeders/index.d.ts +4 -8
  179. package/dist/seeders/index.d.ts.map +1 -1
  180. package/dist/seeders/index.js +18 -16
  181. package/dist/settings/index.d.ts +6 -3
  182. package/dist/settings/index.d.ts.map +1 -0
  183. package/dist/settings/index.js +75 -3
  184. package/dist/settings/settings.entity.d.ts +23 -28
  185. package/dist/settings/settings.entity.d.ts.map +1 -1
  186. package/dist/settings/settings.entity.js +72 -75
  187. package/dist/settings/settings.enum.d.ts +1 -6
  188. package/dist/settings/settings.enum.d.ts.map +1 -1
  189. package/dist/settings/settings.enum.js +10 -19
  190. package/dist/shared/mock-data.d.ts +74 -77
  191. package/dist/shared/mock-data.d.ts.map +1 -1
  192. package/dist/shared/mock-data.js +102 -135
  193. package/dist/shared/overlay-types.d.ts +25 -28
  194. package/dist/shared/overlay-types.d.ts.map +1 -1
  195. package/dist/shared/overlay-types.js +1 -0
  196. package/dist/tests/operations.test-spec.d.ts +4 -9
  197. package/dist/tests/operations.test-spec.d.ts.map +1 -1
  198. package/dist/tests/operations.test-spec.js +108 -118
  199. package/dist/ui/SaasDashboard.d.ts +1 -6
  200. package/dist/ui/SaasDashboard.d.ts.map +1 -1
  201. package/dist/ui/SaasDashboard.js +977 -286
  202. package/dist/ui/SaasProjectList.d.ts +4 -11
  203. package/dist/ui/SaasProjectList.d.ts.map +1 -1
  204. package/dist/ui/SaasProjectList.js +159 -72
  205. package/dist/ui/SaasSettingsPanel.d.ts +1 -6
  206. package/dist/ui/SaasSettingsPanel.d.ts.map +1 -1
  207. package/dist/ui/SaasSettingsPanel.js +142 -134
  208. package/dist/ui/hooks/index.d.ts +3 -3
  209. package/dist/ui/hooks/index.d.ts.map +1 -0
  210. package/dist/ui/hooks/index.js +158 -4
  211. package/dist/ui/hooks/useProjectList.d.ts +26 -30
  212. package/dist/ui/hooks/useProjectList.d.ts.map +1 -1
  213. package/dist/ui/hooks/useProjectList.js +63 -71
  214. package/dist/ui/hooks/useProjectMutations.d.ts +20 -24
  215. package/dist/ui/hooks/useProjectMutations.d.ts.map +1 -1
  216. package/dist/ui/hooks/useProjectMutations.js +88 -142
  217. package/dist/ui/index.d.ts +8 -14
  218. package/dist/ui/index.d.ts.map +1 -0
  219. package/dist/ui/index.js +1809 -15
  220. package/dist/ui/modals/CreateProjectModal.d.ts +10 -19
  221. package/dist/ui/modals/CreateProjectModal.d.ts.map +1 -1
  222. package/dist/ui/modals/CreateProjectModal.js +150 -135
  223. package/dist/ui/modals/ProjectActionsModal.d.ts +20 -33
  224. package/dist/ui/modals/ProjectActionsModal.d.ts.map +1 -1
  225. package/dist/ui/modals/ProjectActionsModal.js +333 -289
  226. package/dist/ui/modals/index.d.ts +3 -3
  227. package/dist/ui/modals/index.d.ts.map +1 -0
  228. package/dist/ui/modals/index.js +487 -3
  229. package/dist/ui/overlays/demo-overlays.d.ts +10 -9
  230. package/dist/ui/overlays/demo-overlays.d.ts.map +1 -1
  231. package/dist/ui/overlays/demo-overlays.js +60 -68
  232. package/dist/ui/overlays/index.d.ts +2 -2
  233. package/dist/ui/overlays/index.d.ts.map +1 -0
  234. package/dist/ui/overlays/index.js +62 -3
  235. package/dist/ui/renderers/index.d.ts +3 -3
  236. package/dist/ui/renderers/index.d.ts.map +1 -0
  237. package/dist/ui/renderers/index.js +675 -3
  238. package/dist/ui/renderers/project-list.markdown.d.ts +15 -15
  239. package/dist/ui/renderers/project-list.markdown.d.ts.map +1 -1
  240. package/dist/ui/renderers/project-list.markdown.js +496 -144
  241. package/dist/ui/renderers/project-list.renderer.d.ts +6 -8
  242. package/dist/ui/renderers/project-list.renderer.d.ts.map +1 -1
  243. package/dist/ui/renderers/project-list.renderer.js +176 -15
  244. package/package.json +509 -99
  245. package/src/ui/renderers/project-list.markdown.ts +1 -1
  246. package/tsdown.config.js +1 -2
  247. package/.turbo/turbo-build$colon$bundle.log +0 -188
  248. package/dist/billing/billing.entity.js.map +0 -1
  249. package/dist/billing/billing.enum.js.map +0 -1
  250. package/dist/billing/billing.event.js.map +0 -1
  251. package/dist/billing/billing.handler.js.map +0 -1
  252. package/dist/billing/billing.operations.js.map +0 -1
  253. package/dist/billing/billing.presentation.js.map +0 -1
  254. package/dist/billing/billing.schema.js.map +0 -1
  255. package/dist/dashboard/dashboard.presentation.js.map +0 -1
  256. package/dist/docs/saas-boilerplate.docblock.js.map +0 -1
  257. package/dist/example.js.map +0 -1
  258. package/dist/handlers/saas.handlers.js.map +0 -1
  259. package/dist/index.js.map +0 -1
  260. package/dist/presentations/index.js.map +0 -1
  261. package/dist/project/project.entity.js.map +0 -1
  262. package/dist/project/project.enum.js.map +0 -1
  263. package/dist/project/project.event.js.map +0 -1
  264. package/dist/project/project.handler.js.map +0 -1
  265. package/dist/project/project.operations.js.map +0 -1
  266. package/dist/project/project.presentation.js.map +0 -1
  267. package/dist/project/project.schema.js.map +0 -1
  268. package/dist/saas-boilerplate.feature.js.map +0 -1
  269. package/dist/seeders/index.js.map +0 -1
  270. package/dist/settings/settings.entity.js.map +0 -1
  271. package/dist/settings/settings.enum.js.map +0 -1
  272. package/dist/shared/mock-data.js.map +0 -1
  273. package/dist/tests/operations.test-spec.js.map +0 -1
  274. package/dist/ui/SaasDashboard.js.map +0 -1
  275. package/dist/ui/SaasProjectList.js.map +0 -1
  276. package/dist/ui/SaasSettingsPanel.js.map +0 -1
  277. package/dist/ui/hooks/useProjectList.js.map +0 -1
  278. package/dist/ui/hooks/useProjectMutations.js.map +0 -1
  279. package/dist/ui/modals/CreateProjectModal.js.map +0 -1
  280. package/dist/ui/modals/ProjectActionsModal.js.map +0 -1
  281. package/dist/ui/overlays/demo-overlays.js.map +0 -1
  282. package/dist/ui/renderers/project-list.markdown.js.map +0 -1
  283. package/dist/ui/renderers/project-list.renderer.js.map +0 -1
  284. package/tsconfig.tsbuildinfo +0 -1
@@ -1,65 +1,178 @@
1
- import { ProjectModel } from "./project.schema.js";
2
- import { StabilityEnum, definePresentation } from "@contractspec/lib.contracts";
1
+ // @bun
2
+ // src/project/project.enum.ts
3
+ import { defineEnum } from "@contractspec/lib.schema";
4
+ var ProjectStatusSchemaEnum = defineEnum("ProjectStatus", [
5
+ "DRAFT",
6
+ "ACTIVE",
7
+ "ARCHIVED",
8
+ "DELETED"
9
+ ]);
10
+ var ProjectStatusFilterEnum = defineEnum("ProjectStatusFilter", [
11
+ "DRAFT",
12
+ "ACTIVE",
13
+ "ARCHIVED",
14
+ "all"
15
+ ]);
3
16
 
4
- //#region src/project/project.presentation.ts
5
- /**
6
- * Presentation for displaying a list of projects.
7
- */
8
- const ProjectListPresentation = definePresentation({
9
- meta: {
10
- key: "saas.project.list",
11
- version: "1.0.0",
12
- title: "Project List",
13
- description: "List view of projects with status, tags, and last updated info",
14
- domain: "saas-boilerplate",
15
- owners: ["@saas-team"],
16
- tags: [
17
- "project",
18
- "list",
19
- "dashboard"
20
- ],
21
- stability: StabilityEnum.Beta,
22
- goal: "Browse and manage projects",
23
- context: "Project list page"
24
- },
25
- source: {
26
- type: "component",
27
- framework: "react",
28
- componentKey: "ProjectListView",
29
- props: ProjectModel
30
- },
31
- targets: [
32
- "react",
33
- "markdown",
34
- "application/json"
35
- ],
36
- policy: { flags: ["saas.projects.enabled"] }
17
+ // src/project/project.schema.ts
18
+ import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
19
+ var ProjectModel = defineSchemaModel({
20
+ name: "Project",
21
+ description: "A project within an organization",
22
+ fields: {
23
+ id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
24
+ name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
25
+ description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
26
+ slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
27
+ organizationId: {
28
+ type: ScalarTypeEnum.String_unsecure(),
29
+ isOptional: false
30
+ },
31
+ createdBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
32
+ status: { type: ProjectStatusSchemaEnum, isOptional: false },
33
+ isPublic: { type: ScalarTypeEnum.Boolean(), isOptional: false },
34
+ tags: {
35
+ type: ScalarTypeEnum.String_unsecure(),
36
+ isArray: true,
37
+ isOptional: false
38
+ },
39
+ createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },
40
+ updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
41
+ }
37
42
  });
38
- /**
39
- * Presentation for project detail view.
40
- */
41
- const ProjectDetailPresentation = definePresentation({
42
- meta: {
43
- key: "saas.project.detail",
44
- version: "1.0.0",
45
- title: "Project Details",
46
- description: "Detailed view of a project with settings and activity",
47
- domain: "saas-boilerplate",
48
- owners: ["@saas-team"],
49
- tags: ["project", "detail"],
50
- stability: StabilityEnum.Beta,
51
- goal: "View and edit project details",
52
- context: "Project detail page"
53
- },
54
- source: {
55
- type: "component",
56
- framework: "react",
57
- componentKey: "ProjectDetailView"
58
- },
59
- targets: ["react", "markdown"],
60
- policy: { flags: ["saas.projects.enabled"] }
43
+ var CreateProjectInputModel = defineSchemaModel({
44
+ name: "CreateProjectInput",
45
+ description: "Input for creating a project",
46
+ fields: {
47
+ name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
48
+ description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
49
+ slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
50
+ isPublic: { type: ScalarTypeEnum.Boolean(), isOptional: true },
51
+ tags: {
52
+ type: ScalarTypeEnum.String_unsecure(),
53
+ isArray: true,
54
+ isOptional: true
55
+ }
56
+ }
57
+ });
58
+ var UpdateProjectInputModel = defineSchemaModel({
59
+ name: "UpdateProjectInput",
60
+ description: "Input for updating a project",
61
+ fields: {
62
+ projectId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
63
+ name: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
64
+ description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
65
+ slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
66
+ isPublic: { type: ScalarTypeEnum.Boolean(), isOptional: true },
67
+ tags: {
68
+ type: ScalarTypeEnum.String_unsecure(),
69
+ isArray: true,
70
+ isOptional: true
71
+ },
72
+ status: { type: ProjectStatusSchemaEnum, isOptional: true }
73
+ }
74
+ });
75
+ var GetProjectInputModel = defineSchemaModel({
76
+ name: "GetProjectInput",
77
+ fields: {
78
+ projectId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }
79
+ }
80
+ });
81
+ var DeleteProjectInputModel = defineSchemaModel({
82
+ name: "DeleteProjectInput",
83
+ fields: {
84
+ projectId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }
85
+ }
86
+ });
87
+ var DeleteProjectOutputModel = defineSchemaModel({
88
+ name: "DeleteProjectOutput",
89
+ fields: {
90
+ success: { type: ScalarTypeEnum.Boolean(), isOptional: false }
91
+ }
92
+ });
93
+ var ProjectDeletedPayloadModel = defineSchemaModel({
94
+ name: "ProjectDeletedPayload",
95
+ fields: {
96
+ projectId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }
97
+ }
98
+ });
99
+ var ListProjectsInputModel = defineSchemaModel({
100
+ name: "ListProjectsInput",
101
+ description: "Input for listing projects",
102
+ fields: {
103
+ status: { type: ProjectStatusFilterEnum, isOptional: true },
104
+ search: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
105
+ limit: {
106
+ type: ScalarTypeEnum.Int_unsecure(),
107
+ isOptional: true,
108
+ defaultValue: 20
109
+ },
110
+ offset: {
111
+ type: ScalarTypeEnum.Int_unsecure(),
112
+ isOptional: true,
113
+ defaultValue: 0
114
+ }
115
+ }
116
+ });
117
+ var ListProjectsOutputModel = defineSchemaModel({
118
+ name: "ListProjectsOutput",
119
+ description: "Output for listing projects",
120
+ fields: {
121
+ projects: { type: ProjectModel, isArray: true, isOptional: false },
122
+ total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false }
123
+ }
61
124
  });
62
125
 
63
- //#endregion
64
- export { ProjectDetailPresentation, ProjectListPresentation };
65
- //# sourceMappingURL=project.presentation.js.map
126
+ // src/project/project.presentation.ts
127
+ import { definePresentation, StabilityEnum } from "@contractspec/lib.contracts";
128
+ var ProjectListPresentation = definePresentation({
129
+ meta: {
130
+ key: "saas.project.list",
131
+ version: "1.0.0",
132
+ title: "Project List",
133
+ description: "List view of projects with status, tags, and last updated info",
134
+ domain: "saas-boilerplate",
135
+ owners: ["@saas-team"],
136
+ tags: ["project", "list", "dashboard"],
137
+ stability: StabilityEnum.Beta,
138
+ goal: "Browse and manage projects",
139
+ context: "Project list page"
140
+ },
141
+ source: {
142
+ type: "component",
143
+ framework: "react",
144
+ componentKey: "ProjectListView",
145
+ props: ProjectModel
146
+ },
147
+ targets: ["react", "markdown", "application/json"],
148
+ policy: {
149
+ flags: ["saas.projects.enabled"]
150
+ }
151
+ });
152
+ var ProjectDetailPresentation = definePresentation({
153
+ meta: {
154
+ key: "saas.project.detail",
155
+ version: "1.0.0",
156
+ title: "Project Details",
157
+ description: "Detailed view of a project with settings and activity",
158
+ domain: "saas-boilerplate",
159
+ owners: ["@saas-team"],
160
+ tags: ["project", "detail"],
161
+ stability: StabilityEnum.Beta,
162
+ goal: "View and edit project details",
163
+ context: "Project detail page"
164
+ },
165
+ source: {
166
+ type: "component",
167
+ framework: "react",
168
+ componentKey: "ProjectDetailView"
169
+ },
170
+ targets: ["react", "markdown"],
171
+ policy: {
172
+ flags: ["saas.projects.enabled"]
173
+ }
174
+ });
175
+ export {
176
+ ProjectListPresentation,
177
+ ProjectDetailPresentation
178
+ };
@@ -1,235 +1,230 @@
1
- import * as _contractspec_lib_schema317 from "@contractspec/lib.schema";
2
-
3
- //#region src/project/project.schema.d.ts
4
1
  /**
5
2
  * A project within an organization.
6
3
  */
7
- declare const ProjectModel: _contractspec_lib_schema317.SchemaModel<{
8
- id: {
9
- type: _contractspec_lib_schema317.FieldType<string, string>;
10
- isOptional: false;
11
- };
12
- name: {
13
- type: _contractspec_lib_schema317.FieldType<string, string>;
14
- isOptional: false;
15
- };
16
- description: {
17
- type: _contractspec_lib_schema317.FieldType<string, string>;
18
- isOptional: true;
19
- };
20
- slug: {
21
- type: _contractspec_lib_schema317.FieldType<string, string>;
22
- isOptional: true;
23
- };
24
- organizationId: {
25
- type: _contractspec_lib_schema317.FieldType<string, string>;
26
- isOptional: false;
27
- };
28
- createdBy: {
29
- type: _contractspec_lib_schema317.FieldType<string, string>;
30
- isOptional: false;
31
- };
32
- status: {
33
- type: _contractspec_lib_schema317.EnumType<[string, string, string, string]>;
34
- isOptional: false;
35
- };
36
- isPublic: {
37
- type: _contractspec_lib_schema317.FieldType<boolean, boolean>;
38
- isOptional: false;
39
- };
40
- tags: {
41
- type: _contractspec_lib_schema317.FieldType<string, string>;
42
- isArray: true;
43
- isOptional: false;
44
- };
45
- createdAt: {
46
- type: _contractspec_lib_schema317.FieldType<Date, string>;
47
- isOptional: false;
48
- };
49
- updatedAt: {
50
- type: _contractspec_lib_schema317.FieldType<Date, string>;
51
- isOptional: false;
52
- };
4
+ export declare const ProjectModel: import("@contractspec/lib.schema").SchemaModel<{
5
+ id: {
6
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
7
+ isOptional: false;
8
+ };
9
+ name: {
10
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
11
+ isOptional: false;
12
+ };
13
+ description: {
14
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
15
+ isOptional: true;
16
+ };
17
+ slug: {
18
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
19
+ isOptional: true;
20
+ };
21
+ organizationId: {
22
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
23
+ isOptional: false;
24
+ };
25
+ createdBy: {
26
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
27
+ isOptional: false;
28
+ };
29
+ status: {
30
+ type: import("@contractspec/lib.schema").EnumType<[string, string, string, string]>;
31
+ isOptional: false;
32
+ };
33
+ isPublic: {
34
+ type: import("@contractspec/lib.schema").FieldType<boolean, boolean>;
35
+ isOptional: false;
36
+ };
37
+ tags: {
38
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
39
+ isArray: true;
40
+ isOptional: false;
41
+ };
42
+ createdAt: {
43
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
44
+ isOptional: false;
45
+ };
46
+ updatedAt: {
47
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
48
+ isOptional: false;
49
+ };
53
50
  }>;
54
51
  /**
55
52
  * Input for creating a project.
56
53
  */
57
- declare const CreateProjectInputModel: _contractspec_lib_schema317.SchemaModel<{
58
- name: {
59
- type: _contractspec_lib_schema317.FieldType<string, string>;
60
- isOptional: false;
61
- };
62
- description: {
63
- type: _contractspec_lib_schema317.FieldType<string, string>;
64
- isOptional: true;
65
- };
66
- slug: {
67
- type: _contractspec_lib_schema317.FieldType<string, string>;
68
- isOptional: true;
69
- };
70
- isPublic: {
71
- type: _contractspec_lib_schema317.FieldType<boolean, boolean>;
72
- isOptional: true;
73
- };
74
- tags: {
75
- type: _contractspec_lib_schema317.FieldType<string, string>;
76
- isArray: true;
77
- isOptional: true;
78
- };
54
+ export declare const CreateProjectInputModel: import("@contractspec/lib.schema").SchemaModel<{
55
+ name: {
56
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
57
+ isOptional: false;
58
+ };
59
+ description: {
60
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
61
+ isOptional: true;
62
+ };
63
+ slug: {
64
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
65
+ isOptional: true;
66
+ };
67
+ isPublic: {
68
+ type: import("@contractspec/lib.schema").FieldType<boolean, boolean>;
69
+ isOptional: true;
70
+ };
71
+ tags: {
72
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
73
+ isArray: true;
74
+ isOptional: true;
75
+ };
79
76
  }>;
80
77
  /**
81
78
  * Input for updating a project.
82
79
  */
83
- declare const UpdateProjectInputModel: _contractspec_lib_schema317.SchemaModel<{
84
- projectId: {
85
- type: _contractspec_lib_schema317.FieldType<string, string>;
86
- isOptional: false;
87
- };
88
- name: {
89
- type: _contractspec_lib_schema317.FieldType<string, string>;
90
- isOptional: true;
91
- };
92
- description: {
93
- type: _contractspec_lib_schema317.FieldType<string, string>;
94
- isOptional: true;
95
- };
96
- slug: {
97
- type: _contractspec_lib_schema317.FieldType<string, string>;
98
- isOptional: true;
99
- };
100
- isPublic: {
101
- type: _contractspec_lib_schema317.FieldType<boolean, boolean>;
102
- isOptional: true;
103
- };
104
- tags: {
105
- type: _contractspec_lib_schema317.FieldType<string, string>;
106
- isArray: true;
107
- isOptional: true;
108
- };
109
- status: {
110
- type: _contractspec_lib_schema317.EnumType<[string, string, string, string]>;
111
- isOptional: true;
112
- };
80
+ export declare const UpdateProjectInputModel: import("@contractspec/lib.schema").SchemaModel<{
81
+ projectId: {
82
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
83
+ isOptional: false;
84
+ };
85
+ name: {
86
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
87
+ isOptional: true;
88
+ };
89
+ description: {
90
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
91
+ isOptional: true;
92
+ };
93
+ slug: {
94
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
95
+ isOptional: true;
96
+ };
97
+ isPublic: {
98
+ type: import("@contractspec/lib.schema").FieldType<boolean, boolean>;
99
+ isOptional: true;
100
+ };
101
+ tags: {
102
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
103
+ isArray: true;
104
+ isOptional: true;
105
+ };
106
+ status: {
107
+ type: import("@contractspec/lib.schema").EnumType<[string, string, string, string]>;
108
+ isOptional: true;
109
+ };
113
110
  }>;
114
111
  /**
115
112
  * Input for getting a project.
116
113
  */
117
- declare const GetProjectInputModel: _contractspec_lib_schema317.SchemaModel<{
118
- projectId: {
119
- type: _contractspec_lib_schema317.FieldType<string, string>;
120
- isOptional: false;
121
- };
114
+ export declare const GetProjectInputModel: import("@contractspec/lib.schema").SchemaModel<{
115
+ projectId: {
116
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
117
+ isOptional: false;
118
+ };
122
119
  }>;
123
120
  /**
124
121
  * Input for deleting a project.
125
122
  */
126
- declare const DeleteProjectInputModel: _contractspec_lib_schema317.SchemaModel<{
127
- projectId: {
128
- type: _contractspec_lib_schema317.FieldType<string, string>;
129
- isOptional: false;
130
- };
123
+ export declare const DeleteProjectInputModel: import("@contractspec/lib.schema").SchemaModel<{
124
+ projectId: {
125
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
126
+ isOptional: false;
127
+ };
131
128
  }>;
132
129
  /**
133
130
  * Output for delete operation.
134
131
  */
135
- declare const DeleteProjectOutputModel: _contractspec_lib_schema317.SchemaModel<{
136
- success: {
137
- type: _contractspec_lib_schema317.FieldType<boolean, boolean>;
138
- isOptional: false;
139
- };
132
+ export declare const DeleteProjectOutputModel: import("@contractspec/lib.schema").SchemaModel<{
133
+ success: {
134
+ type: import("@contractspec/lib.schema").FieldType<boolean, boolean>;
135
+ isOptional: false;
136
+ };
140
137
  }>;
141
138
  /**
142
139
  * Payload for project deleted event.
143
140
  */
144
- declare const ProjectDeletedPayloadModel: _contractspec_lib_schema317.SchemaModel<{
145
- projectId: {
146
- type: _contractspec_lib_schema317.FieldType<string, string>;
147
- isOptional: false;
148
- };
141
+ export declare const ProjectDeletedPayloadModel: import("@contractspec/lib.schema").SchemaModel<{
142
+ projectId: {
143
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
144
+ isOptional: false;
145
+ };
149
146
  }>;
150
147
  /**
151
148
  * Input for listing projects.
152
149
  */
153
- declare const ListProjectsInputModel: _contractspec_lib_schema317.SchemaModel<{
154
- status: {
155
- type: _contractspec_lib_schema317.EnumType<[string, string, string, string]>;
156
- isOptional: true;
157
- };
158
- search: {
159
- type: _contractspec_lib_schema317.FieldType<string, string>;
160
- isOptional: true;
161
- };
162
- limit: {
163
- type: _contractspec_lib_schema317.FieldType<number, number>;
164
- isOptional: true;
165
- defaultValue: number;
166
- };
167
- offset: {
168
- type: _contractspec_lib_schema317.FieldType<number, number>;
169
- isOptional: true;
170
- defaultValue: number;
171
- };
150
+ export declare const ListProjectsInputModel: import("@contractspec/lib.schema").SchemaModel<{
151
+ status: {
152
+ type: import("@contractspec/lib.schema").EnumType<[string, string, string, string]>;
153
+ isOptional: true;
154
+ };
155
+ search: {
156
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
157
+ isOptional: true;
158
+ };
159
+ limit: {
160
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
161
+ isOptional: true;
162
+ defaultValue: number;
163
+ };
164
+ offset: {
165
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
166
+ isOptional: true;
167
+ defaultValue: number;
168
+ };
172
169
  }>;
173
170
  /**
174
171
  * Output for listing projects.
175
172
  */
176
- declare const ListProjectsOutputModel: _contractspec_lib_schema317.SchemaModel<{
177
- projects: {
178
- type: _contractspec_lib_schema317.SchemaModel<{
179
- id: {
180
- type: _contractspec_lib_schema317.FieldType<string, string>;
181
- isOptional: false;
182
- };
183
- name: {
184
- type: _contractspec_lib_schema317.FieldType<string, string>;
185
- isOptional: false;
186
- };
187
- description: {
188
- type: _contractspec_lib_schema317.FieldType<string, string>;
189
- isOptional: true;
190
- };
191
- slug: {
192
- type: _contractspec_lib_schema317.FieldType<string, string>;
193
- isOptional: true;
194
- };
195
- organizationId: {
196
- type: _contractspec_lib_schema317.FieldType<string, string>;
197
- isOptional: false;
198
- };
199
- createdBy: {
200
- type: _contractspec_lib_schema317.FieldType<string, string>;
201
- isOptional: false;
202
- };
203
- status: {
204
- type: _contractspec_lib_schema317.EnumType<[string, string, string, string]>;
205
- isOptional: false;
206
- };
207
- isPublic: {
208
- type: _contractspec_lib_schema317.FieldType<boolean, boolean>;
209
- isOptional: false;
210
- };
211
- tags: {
212
- type: _contractspec_lib_schema317.FieldType<string, string>;
173
+ export declare const ListProjectsOutputModel: import("@contractspec/lib.schema").SchemaModel<{
174
+ projects: {
175
+ type: import("@contractspec/lib.schema").SchemaModel<{
176
+ id: {
177
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
178
+ isOptional: false;
179
+ };
180
+ name: {
181
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
182
+ isOptional: false;
183
+ };
184
+ description: {
185
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
186
+ isOptional: true;
187
+ };
188
+ slug: {
189
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
190
+ isOptional: true;
191
+ };
192
+ organizationId: {
193
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
194
+ isOptional: false;
195
+ };
196
+ createdBy: {
197
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
198
+ isOptional: false;
199
+ };
200
+ status: {
201
+ type: import("@contractspec/lib.schema").EnumType<[string, string, string, string]>;
202
+ isOptional: false;
203
+ };
204
+ isPublic: {
205
+ type: import("@contractspec/lib.schema").FieldType<boolean, boolean>;
206
+ isOptional: false;
207
+ };
208
+ tags: {
209
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
210
+ isArray: true;
211
+ isOptional: false;
212
+ };
213
+ createdAt: {
214
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
215
+ isOptional: false;
216
+ };
217
+ updatedAt: {
218
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
219
+ isOptional: false;
220
+ };
221
+ }>;
213
222
  isArray: true;
214
223
  isOptional: false;
215
- };
216
- createdAt: {
217
- type: _contractspec_lib_schema317.FieldType<Date, string>;
218
- isOptional: false;
219
- };
220
- updatedAt: {
221
- type: _contractspec_lib_schema317.FieldType<Date, string>;
222
- isOptional: false;
223
- };
224
- }>;
225
- isArray: true;
226
- isOptional: false;
227
- };
228
- total: {
229
- type: _contractspec_lib_schema317.FieldType<number, number>;
230
- isOptional: false;
231
- };
224
+ };
225
+ total: {
226
+ type: import("@contractspec/lib.schema").FieldType<number, number>;
227
+ isOptional: false;
228
+ };
232
229
  }>;
233
- //#endregion
234
- export { CreateProjectInputModel, DeleteProjectInputModel, DeleteProjectOutputModel, GetProjectInputModel, ListProjectsInputModel, ListProjectsOutputModel, ProjectDeletedPayloadModel, ProjectModel, UpdateProjectInputModel };
235
230
  //# sourceMappingURL=project.schema.d.ts.map