@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.
- package/.turbo/turbo-build.log +160 -188
- package/.turbo/turbo-prebuild.log +1 -0
- package/CHANGELOG.md +45 -0
- package/dist/billing/billing.entity.d.ts +40 -45
- package/dist/billing/billing.entity.d.ts.map +1 -1
- package/dist/billing/billing.entity.js +110 -118
- package/dist/billing/billing.enum.d.ts +2 -8
- package/dist/billing/billing.enum.d.ts.map +1 -1
- package/dist/billing/billing.enum.js +17 -24
- package/dist/billing/billing.event.d.ts +67 -73
- package/dist/billing/billing.event.d.ts.map +1 -1
- package/dist/billing/billing.event.js +84 -146
- package/dist/billing/billing.handler.d.ts +59 -62
- package/dist/billing/billing.handler.d.ts.map +1 -1
- package/dist/billing/billing.handler.js +140 -49
- package/dist/billing/billing.operations.d.ts +138 -144
- package/dist/billing/billing.operations.d.ts.map +1 -1
- package/dist/billing/billing.operations.js +273 -175
- package/dist/billing/billing.presentation.d.ts +2 -7
- package/dist/billing/billing.presentation.d.ts.map +1 -1
- package/dist/billing/billing.presentation.js +51 -57
- package/dist/billing/billing.schema.d.ts +159 -164
- package/dist/billing/billing.schema.d.ts.map +1 -1
- package/dist/billing/billing.schema.js +112 -204
- package/dist/billing/index.d.ts +11 -8
- package/dist/billing/index.d.ts.map +1 -0
- package/dist/billing/index.js +689 -9
- package/dist/browser/billing/billing.entity.js +113 -0
- package/dist/browser/billing/billing.enum.js +19 -0
- package/dist/browser/billing/billing.event.js +90 -0
- package/dist/browser/billing/billing.handler.js +148 -0
- package/dist/browser/billing/billing.operations.js +278 -0
- package/dist/browser/billing/billing.presentation.js +52 -0
- package/dist/browser/billing/billing.schema.js +121 -0
- package/dist/browser/billing/index.js +688 -0
- package/dist/browser/dashboard/dashboard.presentation.js +52 -0
- package/dist/browser/dashboard/index.js +52 -0
- package/dist/browser/docs/index.js +93 -0
- package/dist/browser/docs/saas-boilerplate.docblock.js +93 -0
- package/dist/browser/example.js +39 -0
- package/dist/browser/handlers/index.js +358 -0
- package/dist/browser/handlers/saas.handlers.js +134 -0
- package/dist/browser/index.js +3340 -0
- package/dist/browser/presentations/index.js +290 -0
- package/dist/browser/project/index.js +790 -0
- package/dist/browser/project/project.entity.js +77 -0
- package/dist/browser/project/project.enum.js +18 -0
- package/dist/browser/project/project.event.js +103 -0
- package/dist/browser/project/project.handler.js +178 -0
- package/dist/browser/project/project.operations.js +372 -0
- package/dist/browser/project/project.presentation.js +177 -0
- package/dist/browser/project/project.schema.js +134 -0
- package/dist/browser/saas-boilerplate.feature.js +88 -0
- package/dist/browser/seeders/index.js +20 -0
- package/dist/browser/settings/index.js +75 -0
- package/dist/browser/settings/settings.entity.js +74 -0
- package/dist/browser/settings/settings.enum.js +11 -0
- package/dist/browser/shared/mock-data.js +104 -0
- package/dist/browser/shared/overlay-types.js +0 -0
- package/dist/browser/tests/operations.test-spec.js +112 -0
- package/dist/browser/ui/SaasDashboard.js +988 -0
- package/dist/browser/ui/SaasProjectList.js +162 -0
- package/dist/browser/ui/SaasSettingsPanel.js +145 -0
- package/dist/browser/ui/hooks/index.js +159 -0
- package/dist/browser/ui/hooks/useProjectList.js +66 -0
- package/dist/browser/ui/hooks/useProjectMutations.js +91 -0
- package/dist/browser/ui/index.js +1808 -0
- package/dist/browser/ui/modals/CreateProjectModal.js +153 -0
- package/dist/browser/ui/modals/ProjectActionsModal.js +335 -0
- package/dist/browser/ui/modals/index.js +487 -0
- package/dist/browser/ui/overlays/demo-overlays.js +61 -0
- package/dist/browser/ui/overlays/index.js +61 -0
- package/dist/browser/ui/renderers/index.js +675 -0
- package/dist/browser/ui/renderers/project-list.markdown.js +499 -0
- package/dist/browser/ui/renderers/project-list.renderer.js +177 -0
- package/dist/dashboard/dashboard.presentation.d.ts +2 -7
- package/dist/dashboard/dashboard.presentation.d.ts.map +1 -1
- package/dist/dashboard/dashboard.presentation.js +51 -53
- package/dist/dashboard/index.d.ts +5 -2
- package/dist/dashboard/index.d.ts.map +1 -0
- package/dist/dashboard/index.js +53 -3
- package/dist/docs/index.d.ts +2 -1
- package/dist/docs/index.d.ts.map +1 -0
- package/dist/docs/index.js +94 -1
- package/dist/docs/saas-boilerplate.docblock.d.ts +2 -1
- package/dist/docs/saas-boilerplate.docblock.d.ts.map +1 -0
- package/dist/docs/saas-boilerplate.docblock.js +45 -51
- package/dist/example.d.ts +2 -6
- package/dist/example.d.ts.map +1 -1
- package/dist/example.js +37 -50
- package/dist/handlers/index.d.ts +7 -4
- package/dist/handlers/index.d.ts.map +1 -0
- package/dist/handlers/index.js +358 -4
- package/dist/handlers/saas.handlers.d.ts +60 -60
- package/dist/handlers/saas.handlers.d.ts.map +1 -1
- package/dist/handlers/saas.handlers.js +127 -140
- package/dist/index.d.ts +15 -45
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3335 -75
- package/dist/node/billing/billing.entity.js +113 -0
- package/dist/node/billing/billing.enum.js +19 -0
- package/dist/node/billing/billing.event.js +90 -0
- package/dist/node/billing/billing.handler.js +148 -0
- package/dist/node/billing/billing.operations.js +278 -0
- package/dist/node/billing/billing.presentation.js +52 -0
- package/dist/node/billing/billing.schema.js +121 -0
- package/dist/node/billing/index.js +688 -0
- package/dist/node/dashboard/dashboard.presentation.js +52 -0
- package/dist/node/dashboard/index.js +52 -0
- package/dist/node/docs/index.js +93 -0
- package/dist/node/docs/saas-boilerplate.docblock.js +93 -0
- package/dist/node/example.js +39 -0
- package/dist/node/handlers/index.js +358 -0
- package/dist/node/handlers/saas.handlers.js +134 -0
- package/dist/node/index.js +3340 -0
- package/dist/node/presentations/index.js +290 -0
- package/dist/node/project/index.js +790 -0
- package/dist/node/project/project.entity.js +77 -0
- package/dist/node/project/project.enum.js +18 -0
- package/dist/node/project/project.event.js +103 -0
- package/dist/node/project/project.handler.js +178 -0
- package/dist/node/project/project.operations.js +372 -0
- package/dist/node/project/project.presentation.js +177 -0
- package/dist/node/project/project.schema.js +134 -0
- package/dist/node/saas-boilerplate.feature.js +88 -0
- package/dist/node/seeders/index.js +20 -0
- package/dist/node/settings/index.js +75 -0
- package/dist/node/settings/settings.entity.js +74 -0
- package/dist/node/settings/settings.enum.js +11 -0
- package/dist/node/shared/mock-data.js +104 -0
- package/dist/node/shared/overlay-types.js +0 -0
- package/dist/node/tests/operations.test-spec.js +112 -0
- package/dist/node/ui/SaasDashboard.js +988 -0
- package/dist/node/ui/SaasProjectList.js +162 -0
- package/dist/node/ui/SaasSettingsPanel.js +145 -0
- package/dist/node/ui/hooks/index.js +159 -0
- package/dist/node/ui/hooks/useProjectList.js +66 -0
- package/dist/node/ui/hooks/useProjectMutations.js +91 -0
- package/dist/node/ui/index.js +1808 -0
- package/dist/node/ui/modals/CreateProjectModal.js +153 -0
- package/dist/node/ui/modals/ProjectActionsModal.js +335 -0
- package/dist/node/ui/modals/index.js +487 -0
- package/dist/node/ui/overlays/demo-overlays.js +61 -0
- package/dist/node/ui/overlays/index.js +61 -0
- package/dist/node/ui/renderers/index.js +675 -0
- package/dist/node/ui/renderers/project-list.markdown.js +499 -0
- package/dist/node/ui/renderers/project-list.renderer.js +177 -0
- package/dist/presentations/index.d.ts +13 -15
- package/dist/presentations/index.d.ts.map +1 -1
- package/dist/presentations/index.js +289 -15
- package/dist/project/index.d.ts +11 -8
- package/dist/project/index.d.ts.map +1 -0
- package/dist/project/index.js +791 -9
- package/dist/project/project.entity.d.ts +23 -28
- package/dist/project/project.entity.d.ts.map +1 -1
- package/dist/project/project.entity.js +75 -82
- package/dist/project/project.enum.d.ts +2 -8
- package/dist/project/project.enum.d.ts.map +1 -1
- package/dist/project/project.enum.js +16 -23
- package/dist/project/project.event.d.ts +69 -75
- package/dist/project/project.event.d.ts.map +1 -1
- package/dist/project/project.event.js +95 -156
- package/dist/project/project.handler.d.ts +44 -47
- package/dist/project/project.handler.d.ts.map +1 -1
- package/dist/project/project.handler.js +168 -71
- package/dist/project/project.operations.d.ts +341 -347
- package/dist/project/project.operations.d.ts.map +1 -1
- package/dist/project/project.operations.js +366 -253
- package/dist/project/project.presentation.d.ts +2 -7
- package/dist/project/project.presentation.d.ts.map +1 -1
- package/dist/project/project.presentation.js +174 -61
- package/dist/project/project.schema.d.ts +191 -196
- package/dist/project/project.schema.d.ts.map +1 -1
- package/dist/project/project.schema.js +125 -205
- package/dist/saas-boilerplate.feature.d.ts +1 -7
- package/dist/saas-boilerplate.feature.d.ts.map +1 -1
- package/dist/saas-boilerplate.feature.js +87 -206
- package/dist/seeders/index.d.ts +4 -8
- package/dist/seeders/index.d.ts.map +1 -1
- package/dist/seeders/index.js +18 -16
- package/dist/settings/index.d.ts +6 -3
- package/dist/settings/index.d.ts.map +1 -0
- package/dist/settings/index.js +75 -3
- package/dist/settings/settings.entity.d.ts +23 -28
- package/dist/settings/settings.entity.d.ts.map +1 -1
- package/dist/settings/settings.entity.js +72 -75
- package/dist/settings/settings.enum.d.ts +1 -6
- package/dist/settings/settings.enum.d.ts.map +1 -1
- package/dist/settings/settings.enum.js +10 -19
- package/dist/shared/mock-data.d.ts +74 -77
- package/dist/shared/mock-data.d.ts.map +1 -1
- package/dist/shared/mock-data.js +102 -135
- package/dist/shared/overlay-types.d.ts +25 -28
- package/dist/shared/overlay-types.d.ts.map +1 -1
- package/dist/shared/overlay-types.js +1 -0
- package/dist/tests/operations.test-spec.d.ts +4 -9
- package/dist/tests/operations.test-spec.d.ts.map +1 -1
- package/dist/tests/operations.test-spec.js +108 -118
- package/dist/ui/SaasDashboard.d.ts +1 -6
- package/dist/ui/SaasDashboard.d.ts.map +1 -1
- package/dist/ui/SaasDashboard.js +977 -286
- package/dist/ui/SaasProjectList.d.ts +4 -11
- package/dist/ui/SaasProjectList.d.ts.map +1 -1
- package/dist/ui/SaasProjectList.js +159 -72
- package/dist/ui/SaasSettingsPanel.d.ts +1 -6
- package/dist/ui/SaasSettingsPanel.d.ts.map +1 -1
- package/dist/ui/SaasSettingsPanel.js +142 -134
- package/dist/ui/hooks/index.d.ts +3 -3
- package/dist/ui/hooks/index.d.ts.map +1 -0
- package/dist/ui/hooks/index.js +158 -4
- package/dist/ui/hooks/useProjectList.d.ts +26 -30
- package/dist/ui/hooks/useProjectList.d.ts.map +1 -1
- package/dist/ui/hooks/useProjectList.js +63 -71
- package/dist/ui/hooks/useProjectMutations.d.ts +20 -24
- package/dist/ui/hooks/useProjectMutations.d.ts.map +1 -1
- package/dist/ui/hooks/useProjectMutations.js +88 -142
- package/dist/ui/index.d.ts +8 -14
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +1809 -15
- package/dist/ui/modals/CreateProjectModal.d.ts +10 -19
- package/dist/ui/modals/CreateProjectModal.d.ts.map +1 -1
- package/dist/ui/modals/CreateProjectModal.js +150 -135
- package/dist/ui/modals/ProjectActionsModal.d.ts +20 -33
- package/dist/ui/modals/ProjectActionsModal.d.ts.map +1 -1
- package/dist/ui/modals/ProjectActionsModal.js +333 -289
- package/dist/ui/modals/index.d.ts +3 -3
- package/dist/ui/modals/index.d.ts.map +1 -0
- package/dist/ui/modals/index.js +487 -3
- package/dist/ui/overlays/demo-overlays.d.ts +10 -9
- package/dist/ui/overlays/demo-overlays.d.ts.map +1 -1
- package/dist/ui/overlays/demo-overlays.js +60 -68
- package/dist/ui/overlays/index.d.ts +2 -2
- package/dist/ui/overlays/index.d.ts.map +1 -0
- package/dist/ui/overlays/index.js +62 -3
- package/dist/ui/renderers/index.d.ts +3 -3
- package/dist/ui/renderers/index.d.ts.map +1 -0
- package/dist/ui/renderers/index.js +675 -3
- package/dist/ui/renderers/project-list.markdown.d.ts +15 -15
- package/dist/ui/renderers/project-list.markdown.d.ts.map +1 -1
- package/dist/ui/renderers/project-list.markdown.js +496 -144
- package/dist/ui/renderers/project-list.renderer.d.ts +6 -8
- package/dist/ui/renderers/project-list.renderer.d.ts.map +1 -1
- package/dist/ui/renderers/project-list.renderer.js +176 -15
- package/package.json +509 -99
- package/src/ui/renderers/project-list.markdown.ts +1 -1
- package/tsdown.config.js +1 -2
- package/.turbo/turbo-build$colon$bundle.log +0 -188
- package/dist/billing/billing.entity.js.map +0 -1
- package/dist/billing/billing.enum.js.map +0 -1
- package/dist/billing/billing.event.js.map +0 -1
- package/dist/billing/billing.handler.js.map +0 -1
- package/dist/billing/billing.operations.js.map +0 -1
- package/dist/billing/billing.presentation.js.map +0 -1
- package/dist/billing/billing.schema.js.map +0 -1
- package/dist/dashboard/dashboard.presentation.js.map +0 -1
- package/dist/docs/saas-boilerplate.docblock.js.map +0 -1
- package/dist/example.js.map +0 -1
- package/dist/handlers/saas.handlers.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/presentations/index.js.map +0 -1
- package/dist/project/project.entity.js.map +0 -1
- package/dist/project/project.enum.js.map +0 -1
- package/dist/project/project.event.js.map +0 -1
- package/dist/project/project.handler.js.map +0 -1
- package/dist/project/project.operations.js.map +0 -1
- package/dist/project/project.presentation.js.map +0 -1
- package/dist/project/project.schema.js.map +0 -1
- package/dist/saas-boilerplate.feature.js.map +0 -1
- package/dist/seeders/index.js.map +0 -1
- package/dist/settings/settings.entity.js.map +0 -1
- package/dist/settings/settings.enum.js.map +0 -1
- package/dist/shared/mock-data.js.map +0 -1
- package/dist/tests/operations.test-spec.js.map +0 -1
- package/dist/ui/SaasDashboard.js.map +0 -1
- package/dist/ui/SaasProjectList.js.map +0 -1
- package/dist/ui/SaasSettingsPanel.js.map +0 -1
- package/dist/ui/hooks/useProjectList.js.map +0 -1
- package/dist/ui/hooks/useProjectMutations.js.map +0 -1
- package/dist/ui/modals/CreateProjectModal.js.map +0 -1
- package/dist/ui/modals/ProjectActionsModal.js.map +0 -1
- package/dist/ui/overlays/demo-overlays.js.map +0 -1
- package/dist/ui/renderers/project-list.markdown.js.map +0 -1
- package/dist/ui/renderers/project-list.renderer.js.map +0 -1
- package/tsconfig.tsbuildinfo +0 -1
package/dist/shared/mock-data.js
CHANGED
|
@@ -1,138 +1,105 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
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
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
export interface RenameLabelModification {
|
|
15
|
+
type: 'renameLabel';
|
|
16
|
+
field: string;
|
|
17
|
+
newLabel: string;
|
|
19
18
|
}
|
|
20
|
-
interface AddBadgeModification {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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","
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
declare const
|
|
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","
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
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
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
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
|
-
|
|
122
|
-
|
|
123
|
-
|
|
108
|
+
export {
|
|
109
|
+
ProjectListTest,
|
|
110
|
+
ProjectGetTest,
|
|
111
|
+
BillingUsageSummaryTest,
|
|
112
|
+
BillingSubscriptionGetTest
|
|
113
|
+
};
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
|
|
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","
|
|
1
|
+
{"version":3,"file":"SaasDashboard.d.ts","sourceRoot":"","sources":["../../src/ui/SaasDashboard.tsx"],"names":[],"mappings":"AAkDA,wBAAgB,aAAa,4CAmI5B"}
|