@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 +1 @@
1
- {"version":3,"file":"project.schema.d.ts","names":[],"sources":["../../src/project/project.schema.ts"],"sourcesContent":[],"mappings":";;;;;;AASa,cAAA,YAuBX,8BAvBuB,WAuBvB,CAAA;EAAA,EAAA,EAAA;UAAA,2BAAA,CAAA;;;;;;;;;;;;+CAvBuB,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,IAAA;EA4BZ,CAAA;EAcX,cAAA,EAAA;;;;;+CAdkC,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;EAmBvB,CAAA;EAgBX,MAAA,EAAA;;;;;;;;EAhBkC,IAAA,EAAA;IAqBvB,IAAA,uCAKX,CAAA,MAAA,EAAA,MAAA,CAAA;IAKW,OAAA,EAAA,IAAA;IAUA,UAAA,EAAA,KAAA;EAUA,CAAA;EAUA,SAAA,EAAA;IAiBX,IAAA,uCAAA,KAAA,EAAA,MAAA,CAAA;;;;+CAjBiC,KAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;EAsBtB,CAAA;CAOX,CAAA;;;;cA7GW,qDAAuB;;UAclC,2BAAA,CAAA;;;;;;;;;;EAwFkC,CAAA;;;;;;;;;;;;;;cAnFvB,qDAAuB;;UAgBlC,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAKW,sBAKX,2BAAA,CAL+B;;UAK/B,2BAAA,CAAA;;;;;;;cAKW,yBAKX,2BAAA,CALkC;;UAKlC,2BAAA,CAAA;;;;;;;cAKW,0BAKX,2BAAA,CALmC;;UAKnC,2BAAA,CAAA;;;;;;;cAKW,4BAKX,2BAAA,CALqC;;UAKrC,2BAAA,CAAA;;;;;;;cAKW,oDAAsB;;UAiBjC,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;cAKW,qDAAuB;;;;cAOlC,2BAAA,CAAA"}
1
+ {"version":3,"file":"project.schema.d.ts","sourceRoot":"","sources":["../../src/project/project.schema.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBvB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;EAclC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBlC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;EAK/B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;EAKlC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;EAKnC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;EAKrC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;EAiBjC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOlC,CAAC"}
@@ -1,215 +1,135 @@
1
- import { ProjectStatusFilterEnum, ProjectStatusSchemaEnum } from "./project.enum.js";
2
- import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
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.schema.ts
5
- /**
6
- * A project within an organization.
7
- */
8
- const ProjectModel = defineSchemaModel({
9
- name: "Project",
10
- description: "A project within an organization",
11
- fields: {
12
- id: {
13
- type: ScalarTypeEnum.String_unsecure(),
14
- isOptional: false
15
- },
16
- name: {
17
- type: ScalarTypeEnum.String_unsecure(),
18
- isOptional: false
19
- },
20
- description: {
21
- type: ScalarTypeEnum.String_unsecure(),
22
- isOptional: true
23
- },
24
- slug: {
25
- type: ScalarTypeEnum.String_unsecure(),
26
- isOptional: true
27
- },
28
- organizationId: {
29
- type: ScalarTypeEnum.String_unsecure(),
30
- isOptional: false
31
- },
32
- createdBy: {
33
- type: ScalarTypeEnum.String_unsecure(),
34
- isOptional: false
35
- },
36
- status: {
37
- type: ProjectStatusSchemaEnum,
38
- isOptional: false
39
- },
40
- isPublic: {
41
- type: ScalarTypeEnum.Boolean(),
42
- isOptional: false
43
- },
44
- tags: {
45
- type: ScalarTypeEnum.String_unsecure(),
46
- isArray: true,
47
- isOptional: false
48
- },
49
- createdAt: {
50
- type: ScalarTypeEnum.DateTime(),
51
- isOptional: false
52
- },
53
- updatedAt: {
54
- type: ScalarTypeEnum.DateTime(),
55
- isOptional: false
56
- }
57
- }
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
+ }
58
42
  });
59
- /**
60
- * Input for creating a project.
61
- */
62
- const CreateProjectInputModel = defineSchemaModel({
63
- name: "CreateProjectInput",
64
- description: "Input for creating a project",
65
- fields: {
66
- name: {
67
- type: ScalarTypeEnum.NonEmptyString(),
68
- isOptional: false
69
- },
70
- description: {
71
- type: ScalarTypeEnum.String_unsecure(),
72
- isOptional: true
73
- },
74
- slug: {
75
- type: ScalarTypeEnum.String_unsecure(),
76
- isOptional: true
77
- },
78
- isPublic: {
79
- type: ScalarTypeEnum.Boolean(),
80
- isOptional: true
81
- },
82
- tags: {
83
- type: ScalarTypeEnum.String_unsecure(),
84
- isArray: true,
85
- isOptional: true
86
- }
87
- }
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
+ }
88
57
  });
89
- /**
90
- * Input for updating a project.
91
- */
92
- const UpdateProjectInputModel = defineSchemaModel({
93
- name: "UpdateProjectInput",
94
- description: "Input for updating a project",
95
- fields: {
96
- projectId: {
97
- type: ScalarTypeEnum.String_unsecure(),
98
- isOptional: false
99
- },
100
- name: {
101
- type: ScalarTypeEnum.String_unsecure(),
102
- isOptional: true
103
- },
104
- description: {
105
- type: ScalarTypeEnum.String_unsecure(),
106
- isOptional: true
107
- },
108
- slug: {
109
- type: ScalarTypeEnum.String_unsecure(),
110
- isOptional: true
111
- },
112
- isPublic: {
113
- type: ScalarTypeEnum.Boolean(),
114
- isOptional: true
115
- },
116
- tags: {
117
- type: ScalarTypeEnum.String_unsecure(),
118
- isArray: true,
119
- isOptional: true
120
- },
121
- status: {
122
- type: ProjectStatusSchemaEnum,
123
- isOptional: true
124
- }
125
- }
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
+ }
126
74
  });
127
- /**
128
- * Input for getting a project.
129
- */
130
- const GetProjectInputModel = defineSchemaModel({
131
- name: "GetProjectInput",
132
- fields: { projectId: {
133
- type: ScalarTypeEnum.String_unsecure(),
134
- isOptional: false
135
- } }
75
+ var GetProjectInputModel = defineSchemaModel({
76
+ name: "GetProjectInput",
77
+ fields: {
78
+ projectId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }
79
+ }
136
80
  });
137
- /**
138
- * Input for deleting a project.
139
- */
140
- const DeleteProjectInputModel = defineSchemaModel({
141
- name: "DeleteProjectInput",
142
- fields: { projectId: {
143
- type: ScalarTypeEnum.String_unsecure(),
144
- isOptional: false
145
- } }
81
+ var DeleteProjectInputModel = defineSchemaModel({
82
+ name: "DeleteProjectInput",
83
+ fields: {
84
+ projectId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }
85
+ }
146
86
  });
147
- /**
148
- * Output for delete operation.
149
- */
150
- const DeleteProjectOutputModel = defineSchemaModel({
151
- name: "DeleteProjectOutput",
152
- fields: { success: {
153
- type: ScalarTypeEnum.Boolean(),
154
- isOptional: false
155
- } }
87
+ var DeleteProjectOutputModel = defineSchemaModel({
88
+ name: "DeleteProjectOutput",
89
+ fields: {
90
+ success: { type: ScalarTypeEnum.Boolean(), isOptional: false }
91
+ }
156
92
  });
157
- /**
158
- * Payload for project deleted event.
159
- */
160
- const ProjectDeletedPayloadModel = defineSchemaModel({
161
- name: "ProjectDeletedPayload",
162
- fields: { projectId: {
163
- type: ScalarTypeEnum.String_unsecure(),
164
- isOptional: false
165
- } }
93
+ var ProjectDeletedPayloadModel = defineSchemaModel({
94
+ name: "ProjectDeletedPayload",
95
+ fields: {
96
+ projectId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }
97
+ }
166
98
  });
167
- /**
168
- * Input for listing projects.
169
- */
170
- const ListProjectsInputModel = defineSchemaModel({
171
- name: "ListProjectsInput",
172
- description: "Input for listing projects",
173
- fields: {
174
- status: {
175
- type: ProjectStatusFilterEnum,
176
- isOptional: true
177
- },
178
- search: {
179
- type: ScalarTypeEnum.String_unsecure(),
180
- isOptional: true
181
- },
182
- limit: {
183
- type: ScalarTypeEnum.Int_unsecure(),
184
- isOptional: true,
185
- defaultValue: 20
186
- },
187
- offset: {
188
- type: ScalarTypeEnum.Int_unsecure(),
189
- isOptional: true,
190
- defaultValue: 0
191
- }
192
- }
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
+ }
193
116
  });
194
- /**
195
- * Output for listing projects.
196
- */
197
- const ListProjectsOutputModel = defineSchemaModel({
198
- name: "ListProjectsOutput",
199
- description: "Output for listing projects",
200
- fields: {
201
- projects: {
202
- type: ProjectModel,
203
- isArray: true,
204
- isOptional: false
205
- },
206
- total: {
207
- type: ScalarTypeEnum.Int_unsecure(),
208
- isOptional: false
209
- }
210
- }
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
+ }
211
124
  });
212
-
213
- //#endregion
214
- export { CreateProjectInputModel, DeleteProjectInputModel, DeleteProjectOutputModel, GetProjectInputModel, ListProjectsInputModel, ListProjectsOutputModel, ProjectDeletedPayloadModel, ProjectModel, UpdateProjectInputModel };
215
- //# sourceMappingURL=project.schema.js.map
125
+ export {
126
+ UpdateProjectInputModel,
127
+ ProjectModel,
128
+ ProjectDeletedPayloadModel,
129
+ ListProjectsOutputModel,
130
+ ListProjectsInputModel,
131
+ GetProjectInputModel,
132
+ DeleteProjectOutputModel,
133
+ DeleteProjectInputModel,
134
+ CreateProjectInputModel
135
+ };
@@ -1,12 +1,6 @@
1
- import * as _contractspec_lib_contracts0 from "@contractspec/lib.contracts";
2
-
3
- //#region src/saas-boilerplate.feature.d.ts
4
-
5
1
  /**
6
2
  * SaaS Boilerplate feature module that bundles project management,
7
3
  * billing, and settings operations into an installable feature.
8
4
  */
9
- declare const SaasBoilerplateFeature: _contractspec_lib_contracts0.FeatureModuleSpec;
10
- //#endregion
11
- export { SaasBoilerplateFeature };
5
+ export declare const SaasBoilerplateFeature: import("@contractspec/lib.contracts").FeatureModuleSpec;
12
6
  //# 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":";;;;;;;AAWA;cAAa,wBAqGX,4BAAA,CArGiC"}
1
+ {"version":3,"file":"saas-boilerplate.feature.d.ts","sourceRoot":"","sources":["../src/saas-boilerplate.feature.ts"],"names":[],"mappings":"AAOA;;;GAGG;AACH,eAAO,MAAM,sBAAsB,yDAqGjC,CAAC"}
@@ -1,208 +1,89 @@
1
+ // @bun
2
+ // src/saas-boilerplate.feature.ts
1
3
  import { defineFeature } from "@contractspec/lib.contracts";
2
-
3
- //#region src/saas-boilerplate.feature.ts
4
- /**
5
- * SaaS Boilerplate Feature Module Specification
6
- *
7
- * Defines the feature module for the SaaS application foundation.
8
- */
9
- /**
10
- * SaaS Boilerplate feature module that bundles project management,
11
- * billing, and settings operations into an installable feature.
12
- */
13
- const SaasBoilerplateFeature = defineFeature({
14
- meta: {
15
- key: "saas-boilerplate",
16
- title: "SaaS Boilerplate",
17
- description: "SaaS application foundation with projects, billing, and settings",
18
- domain: "saas",
19
- owners: ["@saas-team"],
20
- tags: [
21
- "saas",
22
- "projects",
23
- "billing"
24
- ],
25
- stability: "experimental",
26
- version: "1.0.0"
27
- },
28
- operations: [
29
- {
30
- key: "saas.project.create",
31
- version: "1.0.0"
32
- },
33
- {
34
- key: "saas.project.get",
35
- version: "1.0.0"
36
- },
37
- {
38
- key: "saas.project.update",
39
- version: "1.0.0"
40
- },
41
- {
42
- key: "saas.project.delete",
43
- version: "1.0.0"
44
- },
45
- {
46
- key: "saas.project.list",
47
- version: "1.0.0"
48
- },
49
- {
50
- key: "saas.billing.subscription.get",
51
- version: "1.0.0"
52
- },
53
- {
54
- key: "saas.billing.usage.record",
55
- version: "1.0.0"
56
- },
57
- {
58
- key: "saas.billing.usage.summary",
59
- version: "1.0.0"
60
- },
61
- {
62
- key: "saas.billing.feature.check",
63
- version: "1.0.0"
64
- }
65
- ],
66
- events: [
67
- {
68
- key: "project.created",
69
- version: "1.0.0"
70
- },
71
- {
72
- key: "project.updated",
73
- version: "1.0.0"
74
- },
75
- {
76
- key: "project.deleted",
77
- version: "1.0.0"
78
- },
79
- {
80
- key: "project.archived",
81
- version: "1.0.0"
82
- },
83
- {
84
- key: "billing.usage.recorded",
85
- version: "1.0.0"
86
- },
87
- {
88
- key: "billing.subscription.changed",
89
- version: "1.0.0"
90
- },
91
- {
92
- key: "billing.limit.reached",
93
- version: "1.0.0"
94
- }
95
- ],
96
- presentations: [
97
- {
98
- key: "saas.dashboard",
99
- version: "1.0.0"
100
- },
101
- {
102
- key: "saas.project.list",
103
- version: "1.0.0"
104
- },
105
- {
106
- key: "saas.project.detail",
107
- version: "1.0.0"
108
- },
109
- {
110
- key: "saas.billing.subscription",
111
- version: "1.0.0"
112
- },
113
- {
114
- key: "saas.billing.usage",
115
- version: "1.0.0"
116
- },
117
- {
118
- key: "saas.settings",
119
- version: "1.0.0"
120
- }
121
- ],
122
- opToPresentation: [
123
- {
124
- op: {
125
- key: "saas.project.list",
126
- version: "1.0.0"
127
- },
128
- pres: {
129
- key: "saas.project.list",
130
- version: "1.0.0"
131
- }
132
- },
133
- {
134
- op: {
135
- key: "saas.project.get",
136
- version: "1.0.0"
137
- },
138
- pres: {
139
- key: "saas.project.detail",
140
- version: "1.0.0"
141
- }
142
- },
143
- {
144
- op: {
145
- key: "saas.billing.subscription.get",
146
- version: "1.0.0"
147
- },
148
- pres: {
149
- key: "saas.billing.subscription",
150
- version: "1.0.0"
151
- }
152
- },
153
- {
154
- op: {
155
- key: "saas.billing.usage.summary",
156
- version: "1.0.0"
157
- },
158
- pres: {
159
- key: "saas.billing.usage",
160
- version: "1.0.0"
161
- }
162
- }
163
- ],
164
- presentationsTargets: [
165
- {
166
- key: "saas.dashboard",
167
- version: "1.0.0",
168
- targets: ["react", "markdown"]
169
- },
170
- {
171
- key: "saas.project.list",
172
- version: "1.0.0",
173
- targets: [
174
- "react",
175
- "markdown",
176
- "application/json"
177
- ]
178
- },
179
- {
180
- key: "saas.billing.subscription",
181
- version: "1.0.0",
182
- targets: ["react", "markdown"]
183
- },
184
- {
185
- key: "saas.billing.usage",
186
- version: "1.0.0",
187
- targets: ["react", "markdown"]
188
- }
189
- ],
190
- capabilities: { requires: [
191
- {
192
- key: "identity",
193
- version: "1.0.0"
194
- },
195
- {
196
- key: "audit-trail",
197
- version: "1.0.0"
198
- },
199
- {
200
- key: "notifications",
201
- version: "1.0.0"
202
- }
203
- ] }
4
+ var SaasBoilerplateFeature = defineFeature({
5
+ meta: {
6
+ key: "saas-boilerplate",
7
+ title: "SaaS Boilerplate",
8
+ description: "SaaS application foundation with projects, billing, and settings",
9
+ domain: "saas",
10
+ owners: ["@saas-team"],
11
+ tags: ["saas", "projects", "billing"],
12
+ stability: "experimental",
13
+ version: "1.0.0"
14
+ },
15
+ operations: [
16
+ { key: "saas.project.create", version: "1.0.0" },
17
+ { key: "saas.project.get", version: "1.0.0" },
18
+ { key: "saas.project.update", version: "1.0.0" },
19
+ { key: "saas.project.delete", version: "1.0.0" },
20
+ { key: "saas.project.list", version: "1.0.0" },
21
+ { key: "saas.billing.subscription.get", version: "1.0.0" },
22
+ { key: "saas.billing.usage.record", version: "1.0.0" },
23
+ { key: "saas.billing.usage.summary", version: "1.0.0" },
24
+ { key: "saas.billing.feature.check", version: "1.0.0" }
25
+ ],
26
+ events: [
27
+ { key: "project.created", version: "1.0.0" },
28
+ { key: "project.updated", version: "1.0.0" },
29
+ { key: "project.deleted", version: "1.0.0" },
30
+ { key: "project.archived", version: "1.0.0" },
31
+ { key: "billing.usage.recorded", version: "1.0.0" },
32
+ { key: "billing.subscription.changed", version: "1.0.0" },
33
+ { key: "billing.limit.reached", version: "1.0.0" }
34
+ ],
35
+ presentations: [
36
+ { key: "saas.dashboard", version: "1.0.0" },
37
+ { key: "saas.project.list", version: "1.0.0" },
38
+ { key: "saas.project.detail", version: "1.0.0" },
39
+ { key: "saas.billing.subscription", version: "1.0.0" },
40
+ { key: "saas.billing.usage", version: "1.0.0" },
41
+ { key: "saas.settings", version: "1.0.0" }
42
+ ],
43
+ opToPresentation: [
44
+ {
45
+ op: { key: "saas.project.list", version: "1.0.0" },
46
+ pres: { key: "saas.project.list", version: "1.0.0" }
47
+ },
48
+ {
49
+ op: { key: "saas.project.get", version: "1.0.0" },
50
+ pres: { key: "saas.project.detail", version: "1.0.0" }
51
+ },
52
+ {
53
+ op: { key: "saas.billing.subscription.get", version: "1.0.0" },
54
+ pres: { key: "saas.billing.subscription", version: "1.0.0" }
55
+ },
56
+ {
57
+ op: { key: "saas.billing.usage.summary", version: "1.0.0" },
58
+ pres: { key: "saas.billing.usage", version: "1.0.0" }
59
+ }
60
+ ],
61
+ presentationsTargets: [
62
+ { key: "saas.dashboard", version: "1.0.0", targets: ["react", "markdown"] },
63
+ {
64
+ key: "saas.project.list",
65
+ version: "1.0.0",
66
+ targets: ["react", "markdown", "application/json"]
67
+ },
68
+ {
69
+ key: "saas.billing.subscription",
70
+ version: "1.0.0",
71
+ targets: ["react", "markdown"]
72
+ },
73
+ {
74
+ key: "saas.billing.usage",
75
+ version: "1.0.0",
76
+ targets: ["react", "markdown"]
77
+ }
78
+ ],
79
+ capabilities: {
80
+ requires: [
81
+ { key: "identity", version: "1.0.0" },
82
+ { key: "audit-trail", version: "1.0.0" },
83
+ { key: "notifications", version: "1.0.0" }
84
+ ]
85
+ }
204
86
  });
205
-
206
- //#endregion
207
- export { SaasBoilerplateFeature };
208
- //# sourceMappingURL=saas-boilerplate.feature.js.map
87
+ export {
88
+ SaasBoilerplateFeature
89
+ };