@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
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
// src/billing/billing.presentation.ts
|
|
2
|
+
import { definePresentation, StabilityEnum } from "@contractspec/lib.contracts";
|
|
3
|
+
var SubscriptionPresentation = definePresentation({
|
|
4
|
+
meta: {
|
|
5
|
+
key: "saas.billing.subscription",
|
|
6
|
+
version: "1.0.0",
|
|
7
|
+
title: "Subscription Status",
|
|
8
|
+
description: "Subscription status with plan info, limits, and current usage",
|
|
9
|
+
domain: "saas-boilerplate",
|
|
10
|
+
owners: ["@saas-team"],
|
|
11
|
+
tags: ["billing", "subscription"],
|
|
12
|
+
stability: StabilityEnum.Beta,
|
|
13
|
+
goal: "View subscription plan and status",
|
|
14
|
+
context: "Billing section"
|
|
15
|
+
},
|
|
16
|
+
source: {
|
|
17
|
+
type: "component",
|
|
18
|
+
framework: "react",
|
|
19
|
+
componentKey: "SubscriptionView"
|
|
20
|
+
},
|
|
21
|
+
targets: ["react", "markdown"],
|
|
22
|
+
policy: {
|
|
23
|
+
flags: ["saas.billing.enabled"]
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
var UsageDashboardPresentation = definePresentation({
|
|
27
|
+
meta: {
|
|
28
|
+
key: "saas.billing.usage",
|
|
29
|
+
version: "1.0.0",
|
|
30
|
+
title: "Usage Dashboard",
|
|
31
|
+
description: "Usage metrics and breakdown by resource type",
|
|
32
|
+
domain: "saas-boilerplate",
|
|
33
|
+
owners: ["@saas-team"],
|
|
34
|
+
tags: ["billing", "usage", "metrics"],
|
|
35
|
+
stability: StabilityEnum.Beta,
|
|
36
|
+
goal: "Monitor feature usage and limits",
|
|
37
|
+
context: "Billing section"
|
|
38
|
+
},
|
|
39
|
+
source: {
|
|
40
|
+
type: "component",
|
|
41
|
+
framework: "react",
|
|
42
|
+
componentKey: "UsageDashboardView"
|
|
43
|
+
},
|
|
44
|
+
targets: ["react", "markdown"],
|
|
45
|
+
policy: {
|
|
46
|
+
flags: ["saas.billing.enabled"]
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
// src/dashboard/dashboard.presentation.ts
|
|
51
|
+
import { definePresentation as definePresentation2, StabilityEnum as StabilityEnum2 } from "@contractspec/lib.contracts";
|
|
52
|
+
var SaasDashboardPresentation = definePresentation2({
|
|
53
|
+
meta: {
|
|
54
|
+
key: "saas.dashboard",
|
|
55
|
+
version: "1.0.0",
|
|
56
|
+
title: "SaaS Dashboard",
|
|
57
|
+
description: "Main SaaS dashboard with project overview, usage stats, and quick actions",
|
|
58
|
+
domain: "saas-boilerplate",
|
|
59
|
+
owners: ["@saas-team"],
|
|
60
|
+
tags: ["dashboard", "overview"],
|
|
61
|
+
stability: StabilityEnum2.Beta,
|
|
62
|
+
goal: "Overview of SaaS activity and metrics",
|
|
63
|
+
context: "Main dashboard"
|
|
64
|
+
},
|
|
65
|
+
source: {
|
|
66
|
+
type: "component",
|
|
67
|
+
framework: "react",
|
|
68
|
+
componentKey: "SaasDashboard"
|
|
69
|
+
},
|
|
70
|
+
targets: ["react", "markdown"],
|
|
71
|
+
policy: {
|
|
72
|
+
flags: ["saas.enabled"]
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
var SettingsPanelPresentation = definePresentation2({
|
|
76
|
+
meta: {
|
|
77
|
+
key: "saas.settings",
|
|
78
|
+
version: "1.0.0",
|
|
79
|
+
title: "Settings Panel",
|
|
80
|
+
description: "Organization and user settings panel",
|
|
81
|
+
domain: "saas-boilerplate",
|
|
82
|
+
owners: ["@saas-team"],
|
|
83
|
+
tags: ["settings", "config"],
|
|
84
|
+
stability: StabilityEnum2.Beta,
|
|
85
|
+
goal: "Configure organization and user settings",
|
|
86
|
+
context: "Settings section"
|
|
87
|
+
},
|
|
88
|
+
source: {
|
|
89
|
+
type: "component",
|
|
90
|
+
framework: "react",
|
|
91
|
+
componentKey: "SettingsPanel"
|
|
92
|
+
},
|
|
93
|
+
targets: ["react"],
|
|
94
|
+
policy: {
|
|
95
|
+
flags: ["saas.enabled"]
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
// src/project/project.enum.ts
|
|
100
|
+
import { defineEnum } from "@contractspec/lib.schema";
|
|
101
|
+
var ProjectStatusSchemaEnum = defineEnum("ProjectStatus", [
|
|
102
|
+
"DRAFT",
|
|
103
|
+
"ACTIVE",
|
|
104
|
+
"ARCHIVED",
|
|
105
|
+
"DELETED"
|
|
106
|
+
]);
|
|
107
|
+
var ProjectStatusFilterEnum = defineEnum("ProjectStatusFilter", [
|
|
108
|
+
"DRAFT",
|
|
109
|
+
"ACTIVE",
|
|
110
|
+
"ARCHIVED",
|
|
111
|
+
"all"
|
|
112
|
+
]);
|
|
113
|
+
|
|
114
|
+
// src/project/project.schema.ts
|
|
115
|
+
import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
|
|
116
|
+
var ProjectModel = defineSchemaModel({
|
|
117
|
+
name: "Project",
|
|
118
|
+
description: "A project within an organization",
|
|
119
|
+
fields: {
|
|
120
|
+
id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
121
|
+
name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
122
|
+
description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
123
|
+
slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
124
|
+
organizationId: {
|
|
125
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
126
|
+
isOptional: false
|
|
127
|
+
},
|
|
128
|
+
createdBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
129
|
+
status: { type: ProjectStatusSchemaEnum, isOptional: false },
|
|
130
|
+
isPublic: { type: ScalarTypeEnum.Boolean(), isOptional: false },
|
|
131
|
+
tags: {
|
|
132
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
133
|
+
isArray: true,
|
|
134
|
+
isOptional: false
|
|
135
|
+
},
|
|
136
|
+
createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },
|
|
137
|
+
updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
var CreateProjectInputModel = defineSchemaModel({
|
|
141
|
+
name: "CreateProjectInput",
|
|
142
|
+
description: "Input for creating a project",
|
|
143
|
+
fields: {
|
|
144
|
+
name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
|
|
145
|
+
description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
146
|
+
slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
147
|
+
isPublic: { type: ScalarTypeEnum.Boolean(), isOptional: true },
|
|
148
|
+
tags: {
|
|
149
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
150
|
+
isArray: true,
|
|
151
|
+
isOptional: true
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
var UpdateProjectInputModel = defineSchemaModel({
|
|
156
|
+
name: "UpdateProjectInput",
|
|
157
|
+
description: "Input for updating a project",
|
|
158
|
+
fields: {
|
|
159
|
+
projectId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
160
|
+
name: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
161
|
+
description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
162
|
+
slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
163
|
+
isPublic: { type: ScalarTypeEnum.Boolean(), isOptional: true },
|
|
164
|
+
tags: {
|
|
165
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
166
|
+
isArray: true,
|
|
167
|
+
isOptional: true
|
|
168
|
+
},
|
|
169
|
+
status: { type: ProjectStatusSchemaEnum, isOptional: true }
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
var GetProjectInputModel = defineSchemaModel({
|
|
173
|
+
name: "GetProjectInput",
|
|
174
|
+
fields: {
|
|
175
|
+
projectId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
var DeleteProjectInputModel = defineSchemaModel({
|
|
179
|
+
name: "DeleteProjectInput",
|
|
180
|
+
fields: {
|
|
181
|
+
projectId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
var DeleteProjectOutputModel = defineSchemaModel({
|
|
185
|
+
name: "DeleteProjectOutput",
|
|
186
|
+
fields: {
|
|
187
|
+
success: { type: ScalarTypeEnum.Boolean(), isOptional: false }
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
var ProjectDeletedPayloadModel = defineSchemaModel({
|
|
191
|
+
name: "ProjectDeletedPayload",
|
|
192
|
+
fields: {
|
|
193
|
+
projectId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
var ListProjectsInputModel = defineSchemaModel({
|
|
197
|
+
name: "ListProjectsInput",
|
|
198
|
+
description: "Input for listing projects",
|
|
199
|
+
fields: {
|
|
200
|
+
status: { type: ProjectStatusFilterEnum, isOptional: true },
|
|
201
|
+
search: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
202
|
+
limit: {
|
|
203
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
204
|
+
isOptional: true,
|
|
205
|
+
defaultValue: 20
|
|
206
|
+
},
|
|
207
|
+
offset: {
|
|
208
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
209
|
+
isOptional: true,
|
|
210
|
+
defaultValue: 0
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
var ListProjectsOutputModel = defineSchemaModel({
|
|
215
|
+
name: "ListProjectsOutput",
|
|
216
|
+
description: "Output for listing projects",
|
|
217
|
+
fields: {
|
|
218
|
+
projects: { type: ProjectModel, isArray: true, isOptional: false },
|
|
219
|
+
total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false }
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
// src/project/project.presentation.ts
|
|
224
|
+
import { definePresentation as definePresentation3, StabilityEnum as StabilityEnum3 } from "@contractspec/lib.contracts";
|
|
225
|
+
var ProjectListPresentation = definePresentation3({
|
|
226
|
+
meta: {
|
|
227
|
+
key: "saas.project.list",
|
|
228
|
+
version: "1.0.0",
|
|
229
|
+
title: "Project List",
|
|
230
|
+
description: "List view of projects with status, tags, and last updated info",
|
|
231
|
+
domain: "saas-boilerplate",
|
|
232
|
+
owners: ["@saas-team"],
|
|
233
|
+
tags: ["project", "list", "dashboard"],
|
|
234
|
+
stability: StabilityEnum3.Beta,
|
|
235
|
+
goal: "Browse and manage projects",
|
|
236
|
+
context: "Project list page"
|
|
237
|
+
},
|
|
238
|
+
source: {
|
|
239
|
+
type: "component",
|
|
240
|
+
framework: "react",
|
|
241
|
+
componentKey: "ProjectListView",
|
|
242
|
+
props: ProjectModel
|
|
243
|
+
},
|
|
244
|
+
targets: ["react", "markdown", "application/json"],
|
|
245
|
+
policy: {
|
|
246
|
+
flags: ["saas.projects.enabled"]
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
var ProjectDetailPresentation = definePresentation3({
|
|
250
|
+
meta: {
|
|
251
|
+
key: "saas.project.detail",
|
|
252
|
+
version: "1.0.0",
|
|
253
|
+
title: "Project Details",
|
|
254
|
+
description: "Detailed view of a project with settings and activity",
|
|
255
|
+
domain: "saas-boilerplate",
|
|
256
|
+
owners: ["@saas-team"],
|
|
257
|
+
tags: ["project", "detail"],
|
|
258
|
+
stability: StabilityEnum3.Beta,
|
|
259
|
+
goal: "View and edit project details",
|
|
260
|
+
context: "Project detail page"
|
|
261
|
+
},
|
|
262
|
+
source: {
|
|
263
|
+
type: "component",
|
|
264
|
+
framework: "react",
|
|
265
|
+
componentKey: "ProjectDetailView"
|
|
266
|
+
},
|
|
267
|
+
targets: ["react", "markdown"],
|
|
268
|
+
policy: {
|
|
269
|
+
flags: ["saas.projects.enabled"]
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
|
|
273
|
+
// src/presentations/index.ts
|
|
274
|
+
var SaasBoilerplatePresentations = {
|
|
275
|
+
SubscriptionPresentation: undefined,
|
|
276
|
+
UsageDashboardPresentation: undefined,
|
|
277
|
+
ProjectListPresentation: undefined,
|
|
278
|
+
ProjectDetailPresentation: undefined,
|
|
279
|
+
SaasDashboardPresentation: undefined,
|
|
280
|
+
SettingsPanelPresentation: undefined
|
|
281
|
+
};
|
|
282
|
+
export {
|
|
283
|
+
UsageDashboardPresentation,
|
|
284
|
+
SubscriptionPresentation,
|
|
285
|
+
SettingsPanelPresentation,
|
|
286
|
+
SaasDashboardPresentation,
|
|
287
|
+
SaasBoilerplatePresentations,
|
|
288
|
+
ProjectListPresentation,
|
|
289
|
+
ProjectDetailPresentation
|
|
290
|
+
};
|