@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,138 +1,105 @@
1
- //#region src/shared/mock-data.ts
2
- /**
3
- * Shared mock data for saas-boilerplate handlers.
4
- */
5
- const MOCK_PROJECTS = [
6
- {
7
- id: "proj-1",
8
- name: "Marketing Website",
9
- description: "Main company website redesign project",
10
- slug: "marketing-website",
11
- organizationId: "demo-org",
12
- createdBy: "user-1",
13
- status: "ACTIVE",
14
- isPublic: false,
15
- tags: [
16
- "marketing",
17
- "website",
18
- "redesign"
19
- ],
20
- createdAt: /* @__PURE__ */ new Date("2024-01-15T10:00:00Z"),
21
- updatedAt: /* @__PURE__ */ new Date("2024-03-20T14:30:00Z")
22
- },
23
- {
24
- id: "proj-2",
25
- name: "Mobile App v2",
26
- description: "Next generation mobile application",
27
- slug: "mobile-app-v2",
28
- organizationId: "demo-org",
29
- createdBy: "user-2",
30
- status: "ACTIVE",
31
- isPublic: false,
32
- tags: [
33
- "mobile",
34
- "app",
35
- "v2"
36
- ],
37
- createdAt: /* @__PURE__ */ new Date("2024-02-01T09:00:00Z"),
38
- updatedAt: /* @__PURE__ */ new Date("2024-04-05T11:15:00Z")
39
- },
40
- {
41
- id: "proj-3",
42
- name: "API Integration",
43
- description: "Third-party API integration project",
44
- slug: "api-integration",
45
- organizationId: "demo-org",
46
- createdBy: "user-1",
47
- status: "DRAFT",
48
- isPublic: false,
49
- tags: ["api", "integration"],
50
- createdAt: /* @__PURE__ */ new Date("2024-03-10T08:00:00Z"),
51
- updatedAt: /* @__PURE__ */ new Date("2024-03-10T08:00:00Z")
52
- },
53
- {
54
- id: "proj-4",
55
- name: "Analytics Dashboard",
56
- description: "Internal analytics and reporting dashboard",
57
- slug: "analytics-dashboard",
58
- organizationId: "demo-org",
59
- createdBy: "user-3",
60
- status: "ARCHIVED",
61
- isPublic: true,
62
- tags: [
63
- "analytics",
64
- "dashboard",
65
- "reporting"
66
- ],
67
- createdAt: /* @__PURE__ */ new Date("2023-10-01T12:00:00Z"),
68
- updatedAt: /* @__PURE__ */ new Date("2024-02-28T16:45:00Z")
69
- }
1
+ // @bun
2
+ // src/shared/mock-data.ts
3
+ var MOCK_PROJECTS = [
4
+ {
5
+ id: "proj-1",
6
+ name: "Marketing Website",
7
+ description: "Main company website redesign project",
8
+ slug: "marketing-website",
9
+ organizationId: "demo-org",
10
+ createdBy: "user-1",
11
+ status: "ACTIVE",
12
+ isPublic: false,
13
+ tags: ["marketing", "website", "redesign"],
14
+ createdAt: new Date("2024-01-15T10:00:00Z"),
15
+ updatedAt: new Date("2024-03-20T14:30:00Z")
16
+ },
17
+ {
18
+ id: "proj-2",
19
+ name: "Mobile App v2",
20
+ description: "Next generation mobile application",
21
+ slug: "mobile-app-v2",
22
+ organizationId: "demo-org",
23
+ createdBy: "user-2",
24
+ status: "ACTIVE",
25
+ isPublic: false,
26
+ tags: ["mobile", "app", "v2"],
27
+ createdAt: new Date("2024-02-01T09:00:00Z"),
28
+ updatedAt: new Date("2024-04-05T11:15:00Z")
29
+ },
30
+ {
31
+ id: "proj-3",
32
+ name: "API Integration",
33
+ description: "Third-party API integration project",
34
+ slug: "api-integration",
35
+ organizationId: "demo-org",
36
+ createdBy: "user-1",
37
+ status: "DRAFT",
38
+ isPublic: false,
39
+ tags: ["api", "integration"],
40
+ createdAt: new Date("2024-03-10T08:00:00Z"),
41
+ updatedAt: new Date("2024-03-10T08:00:00Z")
42
+ },
43
+ {
44
+ id: "proj-4",
45
+ name: "Analytics Dashboard",
46
+ description: "Internal analytics and reporting dashboard",
47
+ slug: "analytics-dashboard",
48
+ organizationId: "demo-org",
49
+ createdBy: "user-3",
50
+ status: "ARCHIVED",
51
+ isPublic: true,
52
+ tags: ["analytics", "dashboard", "reporting"],
53
+ createdAt: new Date("2023-10-01T12:00:00Z"),
54
+ updatedAt: new Date("2024-02-28T16:45:00Z")
55
+ }
70
56
  ];
71
- const MOCK_SUBSCRIPTION = {
72
- id: "sub-1",
73
- organizationId: "demo-org",
74
- planId: "pro",
75
- planName: "Professional",
76
- status: "ACTIVE",
77
- currentPeriodStart: /* @__PURE__ */ new Date("2024-04-01T00:00:00Z"),
78
- currentPeriodEnd: /* @__PURE__ */ new Date("2024-05-01T00:00:00Z"),
79
- limits: {
80
- projects: 25,
81
- users: 10,
82
- storage: 50,
83
- apiCalls: 1e5
84
- },
85
- usage: {
86
- projects: 4,
87
- users: 5,
88
- storage: 12.5,
89
- apiCalls: 45230
90
- }
57
+ var MOCK_SUBSCRIPTION = {
58
+ id: "sub-1",
59
+ organizationId: "demo-org",
60
+ planId: "pro",
61
+ planName: "Professional",
62
+ status: "ACTIVE",
63
+ currentPeriodStart: new Date("2024-04-01T00:00:00Z"),
64
+ currentPeriodEnd: new Date("2024-05-01T00:00:00Z"),
65
+ limits: {
66
+ projects: 25,
67
+ users: 10,
68
+ storage: 50,
69
+ apiCalls: 1e5
70
+ },
71
+ usage: {
72
+ projects: 4,
73
+ users: 5,
74
+ storage: 12.5,
75
+ apiCalls: 45230
76
+ }
91
77
  };
92
- const MOCK_USAGE_SUMMARY = {
93
- organizationId: "demo-org",
94
- period: "current_month",
95
- apiCalls: {
96
- total: 45230,
97
- limit: 1e5,
98
- percentUsed: 45.23
99
- },
100
- storage: {
101
- totalGb: 12.5,
102
- limitGb: 50,
103
- percentUsed: 25
104
- },
105
- activeProjects: 4,
106
- activeUsers: 5,
107
- breakdown: [
108
- {
109
- date: "2024-04-01",
110
- apiCalls: 3200,
111
- storageGb: 12.1
112
- },
113
- {
114
- date: "2024-04-02",
115
- apiCalls: 2800,
116
- storageGb: 12.2
117
- },
118
- {
119
- date: "2024-04-03",
120
- apiCalls: 4100,
121
- storageGb: 12.3
122
- },
123
- {
124
- date: "2024-04-04",
125
- apiCalls: 3600,
126
- storageGb: 12.4
127
- },
128
- {
129
- date: "2024-04-05",
130
- apiCalls: 3800,
131
- storageGb: 12.5
132
- }
133
- ]
78
+ var MOCK_USAGE_SUMMARY = {
79
+ organizationId: "demo-org",
80
+ period: "current_month",
81
+ apiCalls: {
82
+ total: 45230,
83
+ limit: 1e5,
84
+ percentUsed: 45.23
85
+ },
86
+ storage: {
87
+ totalGb: 12.5,
88
+ limitGb: 50,
89
+ percentUsed: 25
90
+ },
91
+ activeProjects: 4,
92
+ activeUsers: 5,
93
+ breakdown: [
94
+ { date: "2024-04-01", apiCalls: 3200, storageGb: 12.1 },
95
+ { date: "2024-04-02", apiCalls: 2800, storageGb: 12.2 },
96
+ { date: "2024-04-03", apiCalls: 4100, storageGb: 12.3 },
97
+ { date: "2024-04-04", apiCalls: 3600, storageGb: 12.4 },
98
+ { date: "2024-04-05", apiCalls: 3800, storageGb: 12.5 }
99
+ ]
100
+ };
101
+ export {
102
+ MOCK_USAGE_SUMMARY,
103
+ MOCK_SUBSCRIPTION,
104
+ MOCK_PROJECTS
134
105
  };
135
-
136
- //#endregion
137
- export { MOCK_PROJECTS, MOCK_SUBSCRIPTION, MOCK_USAGE_SUMMARY };
138
- //# sourceMappingURL=mock-data.js.map
@@ -1,34 +1,31 @@
1
- //#region src/shared/overlay-types.d.ts
2
- interface OverlayDefinition {
3
- overlayId: string;
4
- version: string;
5
- description: string;
6
- appliesTo: Record<string, string>;
7
- modifications: OverlayModification[];
1
+ export interface OverlayDefinition {
2
+ overlayId: string;
3
+ version: string;
4
+ description: string;
5
+ appliesTo: Record<string, string>;
6
+ modifications: OverlayModification[];
8
7
  }
9
- type OverlayModification = HideFieldModification | RenameLabelModification | AddBadgeModification | SetLimitModification;
10
- interface HideFieldModification {
11
- type: 'hideField';
12
- field: string;
13
- reason?: string;
8
+ export type OverlayModification = HideFieldModification | RenameLabelModification | AddBadgeModification | SetLimitModification;
9
+ export interface HideFieldModification {
10
+ type: 'hideField';
11
+ field: string;
12
+ reason?: string;
14
13
  }
15
- interface RenameLabelModification {
16
- type: 'renameLabel';
17
- field: string;
18
- newLabel: string;
14
+ export interface RenameLabelModification {
15
+ type: 'renameLabel';
16
+ field: string;
17
+ newLabel: string;
19
18
  }
20
- interface AddBadgeModification {
21
- type: 'addBadge';
22
- position: 'header' | 'footer';
23
- label: string;
24
- variant: 'warning' | 'info' | 'error' | 'success' | 'default';
19
+ export interface AddBadgeModification {
20
+ type: 'addBadge';
21
+ position: 'header' | 'footer';
22
+ label: string;
23
+ variant: 'warning' | 'info' | 'error' | 'success' | 'default';
25
24
  }
26
- interface SetLimitModification {
27
- type: 'setLimit';
28
- field: string;
29
- max: number;
30
- message: string;
25
+ export interface SetLimitModification {
26
+ type: 'setLimit';
27
+ field: string;
28
+ max: number;
29
+ message: string;
31
30
  }
32
- //#endregion
33
- export { AddBadgeModification, HideFieldModification, OverlayDefinition, OverlayModification, RenameLabelModification, SetLimitModification };
34
31
  //# sourceMappingURL=overlay-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"overlay-types.d.ts","names":[],"sources":["../../src/shared/overlay-types.ts"],"sourcesContent":[],"mappings":";UAAiB,iBAAA;EAAA,SAAA,EAAA,MAAA;EAQL,OAAA,EAAA,MAAA;EACR,WAAA,EAAA,MAAA;EACA,SAAA,EANS,MAMT,CAAA,MAAA,EAAA,MAAA,CAAA;EACA,aAAA,EANa,mBAMb,EAAA;;AACoB,KAJZ,mBAAA,GACR,qBAGoB,GAFpB,uBAEoB,GADpB,oBACoB,GAApB,oBAAoB;AAEP,UAAA,qBAAA,CAAqB;EAMrB,IAAA,EAAA,WAAA;EAMA,KAAA,EAAA,MAAA;EAOA,MAAA,CAAA,EAAA,MAAA;;UAbA,uBAAA;;;;;UAMA,oBAAA;;;;;;UAOA,oBAAA"}
1
+ {"version":3,"file":"overlay-types.d.ts","sourceRoot":"","sources":["../../src/shared/overlay-types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,aAAa,EAAE,mBAAmB,EAAE,CAAC;CACtC;AAED,MAAM,MAAM,mBAAmB,GAC3B,qBAAqB,GACrB,uBAAuB,GACvB,oBAAoB,GACpB,oBAAoB,CAAC;AAEzB,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;CAC/D;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1 @@
1
+ // @bun
@@ -1,10 +1,5 @@
1
- import * as _contractspec_lib_contracts10 from "@contractspec/lib.contracts";
2
-
3
- //#region src/tests/operations.test-spec.d.ts
4
- declare const ProjectListTest: _contractspec_lib_contracts10.TestSpec;
5
- declare const ProjectGetTest: _contractspec_lib_contracts10.TestSpec;
6
- declare const BillingSubscriptionGetTest: _contractspec_lib_contracts10.TestSpec;
7
- declare const BillingUsageSummaryTest: _contractspec_lib_contracts10.TestSpec;
8
- //#endregion
9
- export { BillingSubscriptionGetTest, BillingUsageSummaryTest, ProjectGetTest, ProjectListTest };
1
+ export declare const ProjectListTest: import("@contractspec/lib.contracts").TestSpec;
2
+ export declare const ProjectGetTest: import("@contractspec/lib.contracts").TestSpec;
3
+ export declare const BillingSubscriptionGetTest: import("@contractspec/lib.contracts").TestSpec;
4
+ export declare const BillingUsageSummaryTest: import("@contractspec/lib.contracts").TestSpec;
10
5
  //# sourceMappingURL=operations.test-spec.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"operations.test-spec.d.ts","names":[],"sources":["../../src/tests/operations.test-spec.ts"],"sourcesContent":[],"mappings":";;;cAEa,iBAyBX,6BAAA,CAzB0B;cA2Bf,gBAyBX,6BAAA,CAzByB;cA2Bd,4BAyBX,6BAAA,CAzBqC;AAtD1B,cAiFA,uBAxDX,EAiFA,6BAAA,CAzBkC,QAxDlC"}
1
+ {"version":3,"file":"operations.test-spec.d.ts","sourceRoot":"","sources":["../../src/tests/operations.test-spec.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,gDAyB1B,CAAC;AAEH,eAAO,MAAM,cAAc,gDAyBzB,CAAC;AAEH,eAAO,MAAM,0BAA0B,gDAyBrC,CAAC;AAEH,eAAO,MAAM,uBAAuB,gDAyBlC,CAAC"}
@@ -1,123 +1,113 @@
1
+ // @bun
2
+ // src/tests/operations.test-spec.ts
1
3
  import { defineTestSpec } from "@contractspec/lib.contracts";
2
-
3
- //#region src/tests/operations.test-spec.ts
4
- const ProjectListTest = defineTestSpec({
5
- meta: {
6
- key: "saas.project.list.test",
7
- version: "1.0.0",
8
- stability: "experimental",
9
- owners: ["@example.saas-boilerplate"],
10
- description: "Test for listing projects",
11
- tags: ["test"]
12
- },
13
- target: {
14
- type: "operation",
15
- operation: {
16
- key: "saas.project.list",
17
- version: "1.0.0"
18
- }
19
- },
20
- scenarios: [{
21
- key: "success",
22
- when: { operation: { key: "saas.project.list" } },
23
- then: [{
24
- type: "expectOutput",
25
- match: {}
26
- }]
27
- }, {
28
- key: "error",
29
- when: { operation: { key: "saas.project.list" } },
30
- then: [{ type: "expectError" }]
31
- }]
4
+ var ProjectListTest = defineTestSpec({
5
+ meta: {
6
+ key: "saas.project.list.test",
7
+ version: "1.0.0",
8
+ stability: "experimental",
9
+ owners: ["@example.saas-boilerplate"],
10
+ description: "Test for listing projects",
11
+ tags: ["test"]
12
+ },
13
+ target: {
14
+ type: "operation",
15
+ operation: { key: "saas.project.list", version: "1.0.0" }
16
+ },
17
+ scenarios: [
18
+ {
19
+ key: "success",
20
+ when: { operation: { key: "saas.project.list" } },
21
+ then: [{ type: "expectOutput", match: {} }]
22
+ },
23
+ {
24
+ key: "error",
25
+ when: { operation: { key: "saas.project.list" } },
26
+ then: [{ type: "expectError" }]
27
+ }
28
+ ]
32
29
  });
33
- const ProjectGetTest = defineTestSpec({
34
- meta: {
35
- key: "saas.project.get.test",
36
- version: "1.0.0",
37
- stability: "experimental",
38
- owners: ["@example.saas-boilerplate"],
39
- description: "Test for getting project",
40
- tags: ["test"]
41
- },
42
- target: {
43
- type: "operation",
44
- operation: {
45
- key: "saas.project.get",
46
- version: "1.0.0"
47
- }
48
- },
49
- scenarios: [{
50
- key: "success",
51
- when: { operation: { key: "saas.project.get" } },
52
- then: [{
53
- type: "expectOutput",
54
- match: {}
55
- }]
56
- }, {
57
- key: "error",
58
- when: { operation: { key: "saas.project.get" } },
59
- then: [{ type: "expectError" }]
60
- }]
30
+ var ProjectGetTest = defineTestSpec({
31
+ meta: {
32
+ key: "saas.project.get.test",
33
+ version: "1.0.0",
34
+ stability: "experimental",
35
+ owners: ["@example.saas-boilerplate"],
36
+ description: "Test for getting project",
37
+ tags: ["test"]
38
+ },
39
+ target: {
40
+ type: "operation",
41
+ operation: { key: "saas.project.get", version: "1.0.0" }
42
+ },
43
+ scenarios: [
44
+ {
45
+ key: "success",
46
+ when: { operation: { key: "saas.project.get" } },
47
+ then: [{ type: "expectOutput", match: {} }]
48
+ },
49
+ {
50
+ key: "error",
51
+ when: { operation: { key: "saas.project.get" } },
52
+ then: [{ type: "expectError" }]
53
+ }
54
+ ]
61
55
  });
62
- const BillingSubscriptionGetTest = defineTestSpec({
63
- meta: {
64
- key: "saas.billing.subscription.get.test",
65
- version: "1.0.0",
66
- stability: "experimental",
67
- owners: ["@example.saas-boilerplate"],
68
- description: "Test for getting subscription",
69
- tags: ["test"]
70
- },
71
- target: {
72
- type: "operation",
73
- operation: {
74
- key: "saas.billing.subscription.get",
75
- version: "1.0.0"
76
- }
77
- },
78
- scenarios: [{
79
- key: "success",
80
- when: { operation: { key: "saas.billing.subscription.get" } },
81
- then: [{
82
- type: "expectOutput",
83
- match: {}
84
- }]
85
- }, {
86
- key: "error",
87
- when: { operation: { key: "saas.billing.subscription.get" } },
88
- then: [{ type: "expectError" }]
89
- }]
56
+ var BillingSubscriptionGetTest = defineTestSpec({
57
+ meta: {
58
+ key: "saas.billing.subscription.get.test",
59
+ version: "1.0.0",
60
+ stability: "experimental",
61
+ owners: ["@example.saas-boilerplate"],
62
+ description: "Test for getting subscription",
63
+ tags: ["test"]
64
+ },
65
+ target: {
66
+ type: "operation",
67
+ operation: { key: "saas.billing.subscription.get", version: "1.0.0" }
68
+ },
69
+ scenarios: [
70
+ {
71
+ key: "success",
72
+ when: { operation: { key: "saas.billing.subscription.get" } },
73
+ then: [{ type: "expectOutput", match: {} }]
74
+ },
75
+ {
76
+ key: "error",
77
+ when: { operation: { key: "saas.billing.subscription.get" } },
78
+ then: [{ type: "expectError" }]
79
+ }
80
+ ]
90
81
  });
91
- const BillingUsageSummaryTest = defineTestSpec({
92
- meta: {
93
- key: "saas.billing.usage.summary.test",
94
- version: "1.0.0",
95
- stability: "experimental",
96
- owners: ["@example.saas-boilerplate"],
97
- description: "Test for getting usage summary",
98
- tags: ["test"]
99
- },
100
- target: {
101
- type: "operation",
102
- operation: {
103
- key: "saas.billing.usage.summary",
104
- version: "1.0.0"
105
- }
106
- },
107
- scenarios: [{
108
- key: "success",
109
- when: { operation: { key: "saas.billing.usage.summary" } },
110
- then: [{
111
- type: "expectOutput",
112
- match: {}
113
- }]
114
- }, {
115
- key: "error",
116
- when: { operation: { key: "saas.billing.usage.summary" } },
117
- then: [{ type: "expectError" }]
118
- }]
82
+ var BillingUsageSummaryTest = defineTestSpec({
83
+ meta: {
84
+ key: "saas.billing.usage.summary.test",
85
+ version: "1.0.0",
86
+ stability: "experimental",
87
+ owners: ["@example.saas-boilerplate"],
88
+ description: "Test for getting usage summary",
89
+ tags: ["test"]
90
+ },
91
+ target: {
92
+ type: "operation",
93
+ operation: { key: "saas.billing.usage.summary", version: "1.0.0" }
94
+ },
95
+ scenarios: [
96
+ {
97
+ key: "success",
98
+ when: { operation: { key: "saas.billing.usage.summary" } },
99
+ then: [{ type: "expectOutput", match: {} }]
100
+ },
101
+ {
102
+ key: "error",
103
+ when: { operation: { key: "saas.billing.usage.summary" } },
104
+ then: [{ type: "expectError" }]
105
+ }
106
+ ]
119
107
  });
120
-
121
- //#endregion
122
- export { BillingSubscriptionGetTest, BillingUsageSummaryTest, ProjectGetTest, ProjectListTest };
123
- //# sourceMappingURL=operations.test-spec.js.map
108
+ export {
109
+ ProjectListTest,
110
+ ProjectGetTest,
111
+ BillingUsageSummaryTest,
112
+ BillingSubscriptionGetTest
113
+ };
@@ -1,7 +1,2 @@
1
- import * as react_jsx_runtime0 from "react/jsx-runtime";
2
-
3
- //#region src/ui/SaasDashboard.d.ts
4
- declare function SaasDashboard(): react_jsx_runtime0.JSX.Element;
5
- //#endregion
6
- export { SaasDashboard };
1
+ export declare function SaasDashboard(): import("react/jsx-runtime").JSX.Element;
7
2
  //# sourceMappingURL=SaasDashboard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SaasDashboard.d.ts","names":[],"sources":["../../src/ui/SaasDashboard.tsx"],"sourcesContent":[],"mappings":";;;iBAkDgB,aAAA,CAAA,GAAa,kBAAA,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"SaasDashboard.d.ts","sourceRoot":"","sources":["../../src/ui/SaasDashboard.tsx"],"names":[],"mappings":"AAkDA,wBAAgB,aAAa,4CAmI5B"}