@contractspec/example.saas-boilerplate 1.57.0 → 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 (283) hide show
  1. package/.turbo/turbo-build.log +160 -180
  2. package/.turbo/turbo-prebuild.log +1 -0
  3. package/CHANGELOG.md +20 -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 -7
  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 +38 -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 -59
  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 -14
  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 -7
  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 -6
  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 -8
  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 -14
  239. package/dist/ui/renderers/project-list.markdown.d.ts.map +1 -1
  240. package/dist/ui/renderers/project-list.markdown.js +496 -146
  241. package/dist/ui/renderers/project-list.renderer.d.ts +6 -7
  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 +508 -98
  245. package/tsdown.config.js +1 -2
  246. package/.turbo/turbo-build$colon$bundle.log +0 -180
  247. package/dist/billing/billing.entity.js.map +0 -1
  248. package/dist/billing/billing.enum.js.map +0 -1
  249. package/dist/billing/billing.event.js.map +0 -1
  250. package/dist/billing/billing.handler.js.map +0 -1
  251. package/dist/billing/billing.operations.js.map +0 -1
  252. package/dist/billing/billing.presentation.js.map +0 -1
  253. package/dist/billing/billing.schema.js.map +0 -1
  254. package/dist/dashboard/dashboard.presentation.js.map +0 -1
  255. package/dist/docs/saas-boilerplate.docblock.js.map +0 -1
  256. package/dist/example.js.map +0 -1
  257. package/dist/handlers/saas.handlers.js.map +0 -1
  258. package/dist/index.js.map +0 -1
  259. package/dist/presentations/index.js.map +0 -1
  260. package/dist/project/project.entity.js.map +0 -1
  261. package/dist/project/project.enum.js.map +0 -1
  262. package/dist/project/project.event.js.map +0 -1
  263. package/dist/project/project.handler.js.map +0 -1
  264. package/dist/project/project.operations.js.map +0 -1
  265. package/dist/project/project.presentation.js.map +0 -1
  266. package/dist/project/project.schema.js.map +0 -1
  267. package/dist/saas-boilerplate.feature.js.map +0 -1
  268. package/dist/seeders/index.js.map +0 -1
  269. package/dist/settings/settings.entity.js.map +0 -1
  270. package/dist/settings/settings.enum.js.map +0 -1
  271. package/dist/shared/mock-data.js.map +0 -1
  272. package/dist/tests/operations.test-spec.js.map +0 -1
  273. package/dist/ui/SaasDashboard.js.map +0 -1
  274. package/dist/ui/SaasProjectList.js.map +0 -1
  275. package/dist/ui/SaasSettingsPanel.js.map +0 -1
  276. package/dist/ui/hooks/useProjectList.js.map +0 -1
  277. package/dist/ui/hooks/useProjectMutations.js.map +0 -1
  278. package/dist/ui/modals/CreateProjectModal.js.map +0 -1
  279. package/dist/ui/modals/ProjectActionsModal.js.map +0 -1
  280. package/dist/ui/overlays/demo-overlays.js.map +0 -1
  281. package/dist/ui/renderers/project-list.markdown.js.map +0 -1
  282. package/dist/ui/renderers/project-list.renderer.js.map +0 -1
  283. package/tsconfig.tsbuildinfo +0 -1
@@ -1,40 +1,35 @@
1
- import * as _contractspec_lib_schema0 from "@contractspec/lib.schema";
2
-
3
- //#region src/project/project.entity.d.ts
4
1
  /**
5
2
  * Project status enum for entities.
6
3
  */
7
- declare const ProjectStatusEnum: _contractspec_lib_schema0.EntityEnumDef;
4
+ export declare const ProjectStatusEnum: import("@contractspec/lib.schema").EntityEnumDef;
8
5
  /**
9
6
  * Project entity - team-scoped work container.
10
7
  */
11
- declare const ProjectEntity: _contractspec_lib_schema0.EntitySpec<{
12
- id: _contractspec_lib_schema0.EntityScalarField;
13
- name: _contractspec_lib_schema0.EntityScalarField;
14
- description: _contractspec_lib_schema0.EntityScalarField;
15
- slug: _contractspec_lib_schema0.EntityScalarField;
16
- organizationId: _contractspec_lib_schema0.EntityScalarField;
17
- createdBy: _contractspec_lib_schema0.EntityScalarField;
18
- status: _contractspec_lib_schema0.EntityEnumField;
19
- isPublic: _contractspec_lib_schema0.EntityScalarField;
20
- settings: _contractspec_lib_schema0.EntityScalarField;
21
- tags: _contractspec_lib_schema0.EntityScalarField;
22
- metadata: _contractspec_lib_schema0.EntityScalarField;
23
- createdAt: _contractspec_lib_schema0.EntityScalarField;
24
- updatedAt: _contractspec_lib_schema0.EntityScalarField;
25
- archivedAt: _contractspec_lib_schema0.EntityScalarField;
8
+ export declare const ProjectEntity: import("@contractspec/lib.schema").EntitySpec<{
9
+ id: import("@contractspec/lib.schema").EntityScalarField;
10
+ name: import("@contractspec/lib.schema").EntityScalarField;
11
+ description: import("@contractspec/lib.schema").EntityScalarField;
12
+ slug: import("@contractspec/lib.schema").EntityScalarField;
13
+ organizationId: import("@contractspec/lib.schema").EntityScalarField;
14
+ createdBy: import("@contractspec/lib.schema").EntityScalarField;
15
+ status: import("@contractspec/lib.schema").EntityEnumField;
16
+ isPublic: import("@contractspec/lib.schema").EntityScalarField;
17
+ settings: import("@contractspec/lib.schema").EntityScalarField;
18
+ tags: import("@contractspec/lib.schema").EntityScalarField;
19
+ metadata: import("@contractspec/lib.schema").EntityScalarField;
20
+ createdAt: import("@contractspec/lib.schema").EntityScalarField;
21
+ updatedAt: import("@contractspec/lib.schema").EntityScalarField;
22
+ archivedAt: import("@contractspec/lib.schema").EntityScalarField;
26
23
  }>;
27
24
  /**
28
25
  * ProjectMember entity - project-level access.
29
26
  */
30
- declare const ProjectMemberEntity: _contractspec_lib_schema0.EntitySpec<{
31
- id: _contractspec_lib_schema0.EntityScalarField;
32
- projectId: _contractspec_lib_schema0.EntityScalarField;
33
- userId: _contractspec_lib_schema0.EntityScalarField;
34
- role: _contractspec_lib_schema0.EntityScalarField;
35
- addedBy: _contractspec_lib_schema0.EntityScalarField;
36
- createdAt: _contractspec_lib_schema0.EntityScalarField;
27
+ export declare const ProjectMemberEntity: import("@contractspec/lib.schema").EntitySpec<{
28
+ id: import("@contractspec/lib.schema").EntityScalarField;
29
+ projectId: import("@contractspec/lib.schema").EntityScalarField;
30
+ userId: import("@contractspec/lib.schema").EntityScalarField;
31
+ role: import("@contractspec/lib.schema").EntityScalarField;
32
+ addedBy: import("@contractspec/lib.schema").EntityScalarField;
33
+ createdAt: import("@contractspec/lib.schema").EntityScalarField;
37
34
  }>;
38
- //#endregion
39
- export { ProjectEntity, ProjectMemberEntity, ProjectStatusEnum };
40
35
  //# sourceMappingURL=project.entity.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"project.entity.d.ts","names":[],"sources":["../../src/project/project.entity.ts"],"mappings":";;;;;;cAUa,iBAAA,EAKX,yBAAA,CAL4B,aAAA;;;;cAUjB,aAAA,4BAAa,UAAA;MAmDxB,yBAAA,CAAA,iBAAA;;;;;;;;;;;;;;;;;;cAKW,mBAAA,4BAAmB,UAAA;MAgB9B,yBAAA,CAAA,iBAAA"}
1
+ {"version":3,"file":"project.entity.d.ts","sourceRoot":"","sources":["../../src/project/project.entity.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,eAAO,MAAM,iBAAiB,kDAK5B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;EAmDxB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;EAgB9B,CAAC"}
@@ -1,85 +1,78 @@
1
- import { defineEntity, defineEntityEnum, field, index } from "@contractspec/lib.schema";
2
-
3
- //#region src/project/project.entity.ts
4
- /**
5
- * Project status enum for entities.
6
- */
7
- const ProjectStatusEnum = defineEntityEnum({
8
- name: "ProjectStatus",
9
- values: [
10
- "DRAFT",
11
- "ACTIVE",
12
- "ARCHIVED",
13
- "DELETED"
14
- ],
15
- schema: "saas_app",
16
- description: "Status of a project."
1
+ // @bun
2
+ // src/project/project.entity.ts
3
+ import {
4
+ defineEntity,
5
+ defineEntityEnum,
6
+ field,
7
+ index
8
+ } from "@contractspec/lib.schema";
9
+ var ProjectStatusEnum = defineEntityEnum({
10
+ name: "ProjectStatus",
11
+ values: ["DRAFT", "ACTIVE", "ARCHIVED", "DELETED"],
12
+ schema: "saas_app",
13
+ description: "Status of a project."
17
14
  });
18
- /**
19
- * Project entity - team-scoped work container.
20
- */
21
- const ProjectEntity = defineEntity({
22
- name: "Project",
23
- description: "A project belonging to an organization.",
24
- schema: "saas_app",
25
- map: "project",
26
- fields: {
27
- id: field.id({ description: "Unique project ID" }),
28
- name: field.string({ description: "Project name" }),
29
- description: field.string({
30
- isOptional: true,
31
- description: "Project description"
32
- }),
33
- slug: field.string({
34
- isOptional: true,
35
- description: "URL-friendly identifier"
36
- }),
37
- organizationId: field.foreignKey({ description: "Owning organization" }),
38
- createdBy: field.foreignKey({ description: "User who created the project" }),
39
- status: field.enum("ProjectStatus", { default: "DRAFT" }),
40
- isPublic: field.boolean({
41
- default: false,
42
- description: "Whether project is publicly visible"
43
- }),
44
- settings: field.json({
45
- isOptional: true,
46
- description: "Project-specific settings"
47
- }),
48
- tags: field.string({
49
- isArray: true,
50
- description: "Project tags"
51
- }),
52
- metadata: field.json({ isOptional: true }),
53
- createdAt: field.createdAt(),
54
- updatedAt: field.updatedAt(),
55
- archivedAt: field.dateTime({ isOptional: true })
56
- },
57
- indexes: [
58
- index.on(["organizationId", "status"]),
59
- index.on(["organizationId", "createdAt"]),
60
- index.unique(["organizationId", "slug"])
61
- ],
62
- enums: [ProjectStatusEnum]
15
+ var ProjectEntity = defineEntity({
16
+ name: "Project",
17
+ description: "A project belonging to an organization.",
18
+ schema: "saas_app",
19
+ map: "project",
20
+ fields: {
21
+ id: field.id({ description: "Unique project ID" }),
22
+ name: field.string({ description: "Project name" }),
23
+ description: field.string({
24
+ isOptional: true,
25
+ description: "Project description"
26
+ }),
27
+ slug: field.string({
28
+ isOptional: true,
29
+ description: "URL-friendly identifier"
30
+ }),
31
+ organizationId: field.foreignKey({ description: "Owning organization" }),
32
+ createdBy: field.foreignKey({
33
+ description: "User who created the project"
34
+ }),
35
+ status: field.enum("ProjectStatus", { default: "DRAFT" }),
36
+ isPublic: field.boolean({
37
+ default: false,
38
+ description: "Whether project is publicly visible"
39
+ }),
40
+ settings: field.json({
41
+ isOptional: true,
42
+ description: "Project-specific settings"
43
+ }),
44
+ tags: field.string({ isArray: true, description: "Project tags" }),
45
+ metadata: field.json({ isOptional: true }),
46
+ createdAt: field.createdAt(),
47
+ updatedAt: field.updatedAt(),
48
+ archivedAt: field.dateTime({ isOptional: true })
49
+ },
50
+ indexes: [
51
+ index.on(["organizationId", "status"]),
52
+ index.on(["organizationId", "createdAt"]),
53
+ index.unique(["organizationId", "slug"])
54
+ ],
55
+ enums: [ProjectStatusEnum]
63
56
  });
64
- /**
65
- * ProjectMember entity - project-level access.
66
- */
67
- const ProjectMemberEntity = defineEntity({
68
- name: "ProjectMember",
69
- description: "User access to a specific project.",
70
- schema: "saas_app",
71
- map: "project_member",
72
- fields: {
73
- id: field.id(),
74
- projectId: field.foreignKey(),
75
- userId: field.foreignKey(),
76
- role: field.string({ description: "Role in project (owner, editor, viewer)" }),
77
- addedBy: field.string({ isOptional: true }),
78
- createdAt: field.createdAt()
79
- },
80
- indexes: [index.unique(["projectId", "userId"])]
57
+ var ProjectMemberEntity = defineEntity({
58
+ name: "ProjectMember",
59
+ description: "User access to a specific project.",
60
+ schema: "saas_app",
61
+ map: "project_member",
62
+ fields: {
63
+ id: field.id(),
64
+ projectId: field.foreignKey(),
65
+ userId: field.foreignKey(),
66
+ role: field.string({
67
+ description: "Role in project (owner, editor, viewer)"
68
+ }),
69
+ addedBy: field.string({ isOptional: true }),
70
+ createdAt: field.createdAt()
71
+ },
72
+ indexes: [index.unique(["projectId", "userId"])]
81
73
  });
82
-
83
- //#endregion
84
- export { ProjectEntity, ProjectMemberEntity, ProjectStatusEnum };
85
- //# sourceMappingURL=project.entity.js.map
74
+ export {
75
+ ProjectStatusEnum,
76
+ ProjectMemberEntity,
77
+ ProjectEntity
78
+ };
@@ -1,15 +1,10 @@
1
- import * as _contractspec_lib_schema0 from "@contractspec/lib.schema";
2
-
3
- //#region src/project/project.enum.d.ts
4
1
  /**
5
2
  * Project status enum for contract schemas.
6
3
  * Note: Entity enum is defined separately in project.entity.ts
7
4
  */
8
- declare const ProjectStatusSchemaEnum: _contractspec_lib_schema0.EnumType<[string, string, string, string]>;
5
+ export declare const ProjectStatusSchemaEnum: import("@contractspec/lib.schema").EnumType<[string, string, string, string]>;
9
6
  /**
10
7
  * Project status filter enum (includes 'all' option).
11
8
  */
12
- declare const ProjectStatusFilterEnum: _contractspec_lib_schema0.EnumType<[string, string, string, string]>;
13
- //#endregion
14
- export { ProjectStatusFilterEnum, ProjectStatusSchemaEnum };
9
+ export declare const ProjectStatusFilterEnum: import("@contractspec/lib.schema").EnumType<[string, string, string, string]>;
15
10
  //# sourceMappingURL=project.enum.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"project.enum.d.ts","names":[],"sources":["../../src/project/project.enum.ts"],"mappings":";;;;;;AAMA;cAAa,uBAAA,EAKX,yBAAA,CALkC,QAAA;;;;cAUvB,uBAAA,EAKX,yBAAA,CALkC,QAAA"}
1
+ {"version":3,"file":"project.enum.d.ts","sourceRoot":"","sources":["../../src/project/project.enum.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,uBAAuB,+EAKlC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,uBAAuB,+EAKlC,CAAC"}
@@ -1,26 +1,19 @@
1
+ // @bun
2
+ // src/project/project.enum.ts
1
3
  import { defineEnum } from "@contractspec/lib.schema";
2
-
3
- //#region src/project/project.enum.ts
4
- /**
5
- * Project status enum for contract schemas.
6
- * Note: Entity enum is defined separately in project.entity.ts
7
- */
8
- const ProjectStatusSchemaEnum = defineEnum("ProjectStatus", [
9
- "DRAFT",
10
- "ACTIVE",
11
- "ARCHIVED",
12
- "DELETED"
4
+ var ProjectStatusSchemaEnum = defineEnum("ProjectStatus", [
5
+ "DRAFT",
6
+ "ACTIVE",
7
+ "ARCHIVED",
8
+ "DELETED"
13
9
  ]);
14
- /**
15
- * Project status filter enum (includes 'all' option).
16
- */
17
- const ProjectStatusFilterEnum = defineEnum("ProjectStatusFilter", [
18
- "DRAFT",
19
- "ACTIVE",
20
- "ARCHIVED",
21
- "all"
10
+ var ProjectStatusFilterEnum = defineEnum("ProjectStatusFilter", [
11
+ "DRAFT",
12
+ "ACTIVE",
13
+ "ARCHIVED",
14
+ "all"
22
15
  ]);
23
-
24
- //#endregion
25
- export { ProjectStatusFilterEnum, ProjectStatusSchemaEnum };
26
- //# sourceMappingURL=project.enum.js.map
16
+ export {
17
+ ProjectStatusSchemaEnum,
18
+ ProjectStatusFilterEnum
19
+ };
@@ -1,92 +1,86 @@
1
- import * as _contractspec_lib_contracts0 from "@contractspec/lib.contracts";
2
- import * as _contractspec_lib_schema0 from "@contractspec/lib.schema";
3
-
4
- //#region src/project/project.event.d.ts
5
1
  /**
6
2
  * Event: A new project has been created.
7
3
  */
8
- declare const ProjectCreatedEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema0.SchemaModel<{
9
- projectId: {
10
- type: _contractspec_lib_schema0.FieldType<string, string>;
11
- isOptional: false;
12
- };
13
- name: {
14
- type: _contractspec_lib_schema0.FieldType<string, string>;
15
- isOptional: false;
16
- };
17
- organizationId: {
18
- type: _contractspec_lib_schema0.FieldType<string, string>;
19
- isOptional: false;
20
- };
21
- createdBy: {
22
- type: _contractspec_lib_schema0.FieldType<string, string>;
23
- isOptional: false;
24
- };
25
- createdAt: {
26
- type: _contractspec_lib_schema0.FieldType<Date, string>;
27
- isOptional: false;
28
- };
4
+ export declare const ProjectCreatedEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
5
+ projectId: {
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
+ organizationId: {
14
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
15
+ isOptional: false;
16
+ };
17
+ createdBy: {
18
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
19
+ isOptional: false;
20
+ };
21
+ createdAt: {
22
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
23
+ isOptional: false;
24
+ };
29
25
  }>>;
30
26
  /**
31
27
  * Event: A project has been updated.
32
28
  */
33
- declare const ProjectUpdatedEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema0.SchemaModel<{
34
- projectId: {
35
- type: _contractspec_lib_schema0.FieldType<string, string>;
36
- isOptional: false;
37
- };
38
- updatedFields: {
39
- type: _contractspec_lib_schema0.FieldType<string, string>;
40
- isArray: true;
41
- isOptional: false;
42
- };
43
- updatedBy: {
44
- type: _contractspec_lib_schema0.FieldType<string, string>;
45
- isOptional: false;
46
- };
47
- updatedAt: {
48
- type: _contractspec_lib_schema0.FieldType<Date, string>;
49
- isOptional: false;
50
- };
29
+ export declare const ProjectUpdatedEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
30
+ projectId: {
31
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
32
+ isOptional: false;
33
+ };
34
+ updatedFields: {
35
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
36
+ isArray: true;
37
+ isOptional: false;
38
+ };
39
+ updatedBy: {
40
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
41
+ isOptional: false;
42
+ };
43
+ updatedAt: {
44
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
45
+ isOptional: false;
46
+ };
51
47
  }>>;
52
48
  /**
53
49
  * Event: A project has been deleted.
54
50
  */
55
- declare const ProjectDeletedEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema0.SchemaModel<{
56
- projectId: {
57
- type: _contractspec_lib_schema0.FieldType<string, string>;
58
- isOptional: false;
59
- };
60
- organizationId: {
61
- type: _contractspec_lib_schema0.FieldType<string, string>;
62
- isOptional: false;
63
- };
64
- deletedBy: {
65
- type: _contractspec_lib_schema0.FieldType<string, string>;
66
- isOptional: false;
67
- };
68
- deletedAt: {
69
- type: _contractspec_lib_schema0.FieldType<Date, string>;
70
- isOptional: false;
71
- };
51
+ export declare const ProjectDeletedEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
52
+ projectId: {
53
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
54
+ isOptional: false;
55
+ };
56
+ organizationId: {
57
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
58
+ isOptional: false;
59
+ };
60
+ deletedBy: {
61
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
62
+ isOptional: false;
63
+ };
64
+ deletedAt: {
65
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
66
+ isOptional: false;
67
+ };
72
68
  }>>;
73
69
  /**
74
70
  * Event: A project has been archived.
75
71
  */
76
- declare const ProjectArchivedEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema0.SchemaModel<{
77
- projectId: {
78
- type: _contractspec_lib_schema0.FieldType<string, string>;
79
- isOptional: false;
80
- };
81
- archivedBy: {
82
- type: _contractspec_lib_schema0.FieldType<string, string>;
83
- isOptional: false;
84
- };
85
- archivedAt: {
86
- type: _contractspec_lib_schema0.FieldType<Date, string>;
87
- isOptional: false;
88
- };
72
+ export declare const ProjectArchivedEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
73
+ projectId: {
74
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
75
+ isOptional: false;
76
+ };
77
+ archivedBy: {
78
+ type: import("@contractspec/lib.schema").FieldType<string, string>;
79
+ isOptional: false;
80
+ };
81
+ archivedAt: {
82
+ type: import("@contractspec/lib.schema").FieldType<Date, string>;
83
+ isOptional: false;
84
+ };
89
85
  }>>;
90
- //#endregion
91
- export { ProjectArchivedEvent, ProjectCreatedEvent, ProjectDeletedEvent, ProjectUpdatedEvent };
92
86
  //# sourceMappingURL=project.event.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"project.event.d.ts","names":[],"sources":["../../src/project/project.event.ts"],"mappings":";;;;;;;cAwEa,mBAAA,EAAmB,4BAAA,CAAA,SAAA,2BAAA,WAAA;;UAU9B,yBAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;cAKW,mBAAA,EAAmB,4BAAA,CAAA,SAAA,2BAAA,WAAA;;UAU9B,yBAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;cAKW,mBAAA,EAAmB,4BAAA,CAAA,SAAA,2BAAA,WAAA;;UAU9B,yBAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;cAKW,oBAAA,EAAoB,4BAAA,CAAA,SAAA,2BAAA,WAAA;;UAU/B,yBAAA,CAAA,SAAA"}
1
+ {"version":3,"file":"project.event.d.ts","sourceRoot":"","sources":["../../src/project/project.event.ts"],"names":[],"mappings":"AAqEA;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;GAU9B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;GAU9B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;GAU9B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;GAU/B,CAAC"}