@contractspec/example.saas-boilerplate 3.7.5 → 3.7.7
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 +8 -8
- package/AGENTS.md +50 -27
- package/CHANGELOG.md +16 -0
- package/README.md +64 -144
- package/dist/billing/billing.event.js +1 -1
- package/dist/billing/index.d.ts +6 -6
- package/dist/billing/index.js +1 -1
- package/dist/browser/billing/billing.event.js +1 -1
- package/dist/browser/billing/index.js +1 -1
- package/dist/browser/index.js +931 -932
- package/dist/browser/project/index.js +209 -209
- package/dist/browser/project/project.event.js +1 -1
- package/dist/browser/ui/SaasDashboard.js +45 -45
- package/dist/browser/ui/SaasProjectList.js +7 -7
- package/dist/browser/ui/SaasSettingsPanel.js +12 -12
- package/dist/browser/ui/hooks/index.js +2 -2
- package/dist/browser/ui/hooks/useProjectList.js +1 -1
- package/dist/browser/ui/hooks/useProjectMutations.js +1 -1
- package/dist/browser/ui/index.js +483 -484
- package/dist/browser/ui/modals/CreateProjectModal.js +10 -10
- package/dist/browser/ui/modals/ProjectActionsModal.js +13 -13
- package/dist/browser/ui/modals/index.js +23 -23
- package/dist/browser/ui/renderers/index.js +112 -112
- package/dist/browser/ui/renderers/project-list.renderer.js +7 -7
- package/dist/handlers/index.d.ts +2 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.js +931 -932
- package/dist/node/billing/billing.event.js +1 -1
- package/dist/node/billing/index.js +1 -1
- package/dist/node/index.js +931 -932
- package/dist/node/project/index.js +209 -209
- package/dist/node/project/project.event.js +1 -1
- package/dist/node/ui/SaasDashboard.js +45 -45
- package/dist/node/ui/SaasProjectList.js +7 -7
- package/dist/node/ui/SaasSettingsPanel.js +12 -12
- package/dist/node/ui/hooks/index.js +2 -2
- package/dist/node/ui/hooks/useProjectList.js +1 -1
- package/dist/node/ui/hooks/useProjectMutations.js +1 -1
- package/dist/node/ui/index.js +483 -484
- package/dist/node/ui/modals/CreateProjectModal.js +10 -10
- package/dist/node/ui/modals/ProjectActionsModal.js +13 -13
- package/dist/node/ui/modals/index.js +23 -23
- package/dist/node/ui/renderers/index.js +112 -112
- package/dist/node/ui/renderers/project-list.renderer.js +7 -7
- package/dist/presentations/index.d.ts +1 -1
- package/dist/project/index.d.ts +7 -7
- package/dist/project/index.js +209 -209
- package/dist/project/project.event.js +1 -1
- package/dist/settings/index.d.ts +1 -1
- package/dist/ui/SaasDashboard.js +45 -45
- package/dist/ui/SaasProjectList.js +7 -7
- package/dist/ui/SaasSettingsPanel.js +12 -12
- package/dist/ui/hooks/index.d.ts +2 -2
- package/dist/ui/hooks/index.js +2 -2
- package/dist/ui/hooks/useProjectList.d.ts +5 -0
- package/dist/ui/hooks/useProjectList.js +1 -1
- package/dist/ui/hooks/useProjectMutations.d.ts +8 -0
- package/dist/ui/hooks/useProjectMutations.js +1 -1
- package/dist/ui/index.d.ts +4 -4
- package/dist/ui/index.js +483 -484
- package/dist/ui/modals/CreateProjectModal.js +10 -10
- package/dist/ui/modals/ProjectActionsModal.js +13 -13
- package/dist/ui/modals/index.js +23 -23
- package/dist/ui/renderers/index.d.ts +1 -1
- package/dist/ui/renderers/index.js +112 -112
- package/dist/ui/renderers/project-list.renderer.d.ts +1 -1
- package/dist/ui/renderers/project-list.renderer.js +7 -7
- package/package.json +14 -14
- package/src/billing/billing.entity.ts +132 -132
- package/src/billing/billing.enum.ts +9 -9
- package/src/billing/billing.event.ts +71 -71
- package/src/billing/billing.handler.ts +87 -87
- package/src/billing/billing.operations.ts +158 -158
- package/src/billing/billing.presentation.ts +45 -45
- package/src/billing/billing.schema.ts +76 -76
- package/src/billing/index.ts +43 -48
- package/src/dashboard/dashboard.presentation.ts +45 -45
- package/src/dashboard/index.ts +2 -2
- package/src/docs/saas-boilerplate.docblock.ts +43 -43
- package/src/example.ts +32 -32
- package/src/handlers/index.ts +9 -9
- package/src/handlers/saas.handlers.ts +250 -249
- package/src/index.ts +40 -41
- package/src/presentations/index.ts +18 -20
- package/src/project/index.ts +45 -50
- package/src/project/project.entity.ts +68 -68
- package/src/project/project.enum.ts +8 -8
- package/src/project/project.event.ts +79 -79
- package/src/project/project.handler.ts +103 -103
- package/src/project/project.operations.ts +236 -236
- package/src/project/project.presentation.ts +46 -46
- package/src/project/project.schema.ts +90 -90
- package/src/saas-boilerplate.feature.ts +100 -100
- package/src/seeders/index.ts +20 -20
- package/src/settings/index.ts +2 -3
- package/src/settings/settings.entity.ts +65 -65
- package/src/settings/settings.enum.ts +4 -4
- package/src/shared/mock-data.ts +92 -92
- package/src/shared/overlay-types.ts +23 -23
- package/src/tests/operations.test-spec.ts +96 -96
- package/src/ui/SaasDashboard.tsx +270 -270
- package/src/ui/SaasProjectList.tsx +90 -90
- package/src/ui/SaasSettingsPanel.tsx +84 -84
- package/src/ui/hooks/index.ts +3 -3
- package/src/ui/hooks/useProjectList.ts +69 -68
- package/src/ui/hooks/useProjectMutations.ts +144 -143
- package/src/ui/index.ts +8 -12
- package/src/ui/modals/CreateProjectModal.tsx +154 -154
- package/src/ui/modals/ProjectActionsModal.tsx +321 -321
- package/src/ui/overlays/demo-overlays.ts +49 -49
- package/src/ui/renderers/index.ts +5 -4
- package/src/ui/renderers/project-list.markdown.ts +204 -204
- package/src/ui/renderers/project-list.renderer.tsx +14 -13
- package/tsconfig.json +7 -8
- package/tsdown.config.js +7 -3
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
defineCommand,
|
|
3
|
+
defineQuery,
|
|
4
4
|
} from '@contractspec/lib.contracts-spec/operations';
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
CreateProjectInputModel,
|
|
7
|
+
DeleteProjectInputModel,
|
|
8
|
+
DeleteProjectOutputModel,
|
|
9
|
+
GetProjectInputModel,
|
|
10
|
+
ListProjectsInputModel,
|
|
11
|
+
ListProjectsOutputModel,
|
|
12
|
+
ProjectDeletedPayloadModel,
|
|
13
|
+
ProjectModel,
|
|
14
|
+
UpdateProjectInputModel,
|
|
15
15
|
} from './project.schema';
|
|
16
16
|
|
|
17
17
|
const OWNERS = ['example.saas-boilerplate'] as const;
|
|
@@ -20,253 +20,253 @@ const OWNERS = ['example.saas-boilerplate'] as const;
|
|
|
20
20
|
* Create a new project.
|
|
21
21
|
*/
|
|
22
22
|
export const CreateProjectContract = defineCommand({
|
|
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
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
23
|
+
meta: {
|
|
24
|
+
key: 'saas.project.create',
|
|
25
|
+
version: '1.0.0',
|
|
26
|
+
stability: 'stable',
|
|
27
|
+
owners: [...OWNERS],
|
|
28
|
+
tags: ['saas', 'project', 'create'],
|
|
29
|
+
description: 'Create a new project in the organization.',
|
|
30
|
+
goal: 'Allow users to create projects for organizing work.',
|
|
31
|
+
context: 'Called from project creation UI or API.',
|
|
32
|
+
},
|
|
33
|
+
io: {
|
|
34
|
+
input: CreateProjectInputModel,
|
|
35
|
+
output: ProjectModel,
|
|
36
|
+
errors: {
|
|
37
|
+
SLUG_EXISTS: {
|
|
38
|
+
description: 'A project with this slug already exists',
|
|
39
|
+
http: 409,
|
|
40
|
+
gqlCode: 'SLUG_EXISTS',
|
|
41
|
+
when: 'Slug is already taken in the organization',
|
|
42
|
+
},
|
|
43
|
+
LIMIT_REACHED: {
|
|
44
|
+
description: 'Project limit reached for this plan',
|
|
45
|
+
http: 403,
|
|
46
|
+
gqlCode: 'LIMIT_REACHED',
|
|
47
|
+
when: 'Organization has reached project limit',
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
policy: {
|
|
52
|
+
auth: 'user',
|
|
53
|
+
},
|
|
54
|
+
sideEffects: {
|
|
55
|
+
emits: [
|
|
56
|
+
{
|
|
57
|
+
key: 'project.created',
|
|
58
|
+
version: '1.0.0',
|
|
59
|
+
when: 'Project is created',
|
|
60
|
+
payload: ProjectModel,
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
audit: ['project.created'],
|
|
64
|
+
},
|
|
65
|
+
acceptance: {
|
|
66
|
+
scenarios: [
|
|
67
|
+
{
|
|
68
|
+
key: 'create-project-happy-path',
|
|
69
|
+
given: ['User is authenticated'],
|
|
70
|
+
when: ['User creates project'],
|
|
71
|
+
then: ['Project is created', 'ProjectCreated event is emitted'],
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
examples: [
|
|
75
|
+
{
|
|
76
|
+
key: 'create-basic',
|
|
77
|
+
input: { name: 'Website Redesign', slug: 'website-redesign' },
|
|
78
|
+
output: { id: 'proj-123', name: 'Website Redesign', isArchived: false },
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
},
|
|
82
82
|
});
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
85
|
* Get project by ID.
|
|
86
86
|
*/
|
|
87
87
|
export const GetProjectContract = defineQuery({
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
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
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
88
|
+
meta: {
|
|
89
|
+
key: 'saas.project.get',
|
|
90
|
+
version: '1.0.0',
|
|
91
|
+
stability: 'stable',
|
|
92
|
+
owners: [...OWNERS],
|
|
93
|
+
tags: ['saas', 'project', 'get'],
|
|
94
|
+
description: 'Get a project by ID.',
|
|
95
|
+
goal: 'Retrieve project details.',
|
|
96
|
+
context: 'Project detail page, API calls.',
|
|
97
|
+
},
|
|
98
|
+
io: {
|
|
99
|
+
input: GetProjectInputModel,
|
|
100
|
+
output: ProjectModel,
|
|
101
|
+
errors: {
|
|
102
|
+
NOT_FOUND: {
|
|
103
|
+
description: 'Project not found',
|
|
104
|
+
http: 404,
|
|
105
|
+
gqlCode: 'NOT_FOUND',
|
|
106
|
+
when: 'Project ID is invalid or user lacks access',
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
policy: {
|
|
111
|
+
auth: 'user',
|
|
112
|
+
},
|
|
113
|
+
acceptance: {
|
|
114
|
+
scenarios: [
|
|
115
|
+
{
|
|
116
|
+
key: 'get-project-happy-path',
|
|
117
|
+
given: ['Project exists'],
|
|
118
|
+
when: ['User requests project'],
|
|
119
|
+
then: ['Project details are returned'],
|
|
120
|
+
},
|
|
121
|
+
],
|
|
122
|
+
examples: [
|
|
123
|
+
{
|
|
124
|
+
key: 'get-existing',
|
|
125
|
+
input: { projectId: 'proj-123' },
|
|
126
|
+
output: { id: 'proj-123', name: 'Website Redesign' },
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
},
|
|
130
130
|
});
|
|
131
131
|
|
|
132
132
|
/**
|
|
133
133
|
* Update a project.
|
|
134
134
|
*/
|
|
135
135
|
export const UpdateProjectContract = defineCommand({
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
136
|
+
meta: {
|
|
137
|
+
key: 'saas.project.update',
|
|
138
|
+
version: '1.0.0',
|
|
139
|
+
stability: 'stable',
|
|
140
|
+
owners: [...OWNERS],
|
|
141
|
+
tags: ['saas', 'project', 'update'],
|
|
142
|
+
description: 'Update project details.',
|
|
143
|
+
goal: 'Allow project owners/editors to modify project.',
|
|
144
|
+
context: 'Project settings page.',
|
|
145
|
+
},
|
|
146
|
+
io: {
|
|
147
|
+
input: UpdateProjectInputModel,
|
|
148
|
+
output: ProjectModel,
|
|
149
|
+
},
|
|
150
|
+
policy: {
|
|
151
|
+
auth: 'user',
|
|
152
|
+
},
|
|
153
|
+
sideEffects: {
|
|
154
|
+
emits: [
|
|
155
|
+
{
|
|
156
|
+
key: 'project.updated',
|
|
157
|
+
version: '1.0.0',
|
|
158
|
+
when: 'Project is updated',
|
|
159
|
+
payload: ProjectModel,
|
|
160
|
+
},
|
|
161
|
+
],
|
|
162
|
+
audit: ['project.updated'],
|
|
163
|
+
},
|
|
164
|
+
acceptance: {
|
|
165
|
+
scenarios: [
|
|
166
|
+
{
|
|
167
|
+
key: 'update-project-happy-path',
|
|
168
|
+
given: ['Project exists'],
|
|
169
|
+
when: ['User updates description'],
|
|
170
|
+
then: ['Project is updated', 'ProjectUpdated event is emitted'],
|
|
171
|
+
},
|
|
172
|
+
],
|
|
173
|
+
examples: [
|
|
174
|
+
{
|
|
175
|
+
key: 'update-desc',
|
|
176
|
+
input: { projectId: 'proj-123', description: 'New description' },
|
|
177
|
+
output: { id: 'proj-123', description: 'New description' },
|
|
178
|
+
},
|
|
179
|
+
],
|
|
180
|
+
},
|
|
181
181
|
});
|
|
182
182
|
|
|
183
183
|
/**
|
|
184
184
|
* Delete a project.
|
|
185
185
|
*/
|
|
186
186
|
export const DeleteProjectContract = defineCommand({
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
187
|
+
meta: {
|
|
188
|
+
key: 'saas.project.delete',
|
|
189
|
+
version: '1.0.0',
|
|
190
|
+
stability: 'stable',
|
|
191
|
+
owners: [...OWNERS],
|
|
192
|
+
tags: ['saas', 'project', 'delete'],
|
|
193
|
+
description: 'Delete a project (soft delete).',
|
|
194
|
+
goal: 'Allow project owners to remove projects.',
|
|
195
|
+
context: 'Project settings page.',
|
|
196
|
+
},
|
|
197
|
+
io: {
|
|
198
|
+
input: DeleteProjectInputModel,
|
|
199
|
+
output: DeleteProjectOutputModel,
|
|
200
|
+
},
|
|
201
|
+
policy: {
|
|
202
|
+
auth: 'user',
|
|
203
|
+
},
|
|
204
|
+
sideEffects: {
|
|
205
|
+
emits: [
|
|
206
|
+
{
|
|
207
|
+
key: 'project.deleted',
|
|
208
|
+
version: '1.0.0',
|
|
209
|
+
when: 'Project is deleted',
|
|
210
|
+
payload: ProjectDeletedPayloadModel,
|
|
211
|
+
},
|
|
212
|
+
],
|
|
213
|
+
audit: ['project.deleted'],
|
|
214
|
+
},
|
|
215
|
+
acceptance: {
|
|
216
|
+
scenarios: [
|
|
217
|
+
{
|
|
218
|
+
key: 'delete-project-happy-path',
|
|
219
|
+
given: ['Project exists'],
|
|
220
|
+
when: ['User deletes project'],
|
|
221
|
+
then: ['Project is deleted', 'ProjectDeleted event is emitted'],
|
|
222
|
+
},
|
|
223
|
+
],
|
|
224
|
+
examples: [
|
|
225
|
+
{
|
|
226
|
+
key: 'delete-existing',
|
|
227
|
+
input: { projectId: 'proj-123' },
|
|
228
|
+
output: { success: true },
|
|
229
|
+
},
|
|
230
|
+
],
|
|
231
|
+
},
|
|
232
232
|
});
|
|
233
233
|
|
|
234
234
|
/**
|
|
235
235
|
* List organization projects.
|
|
236
236
|
*/
|
|
237
237
|
export const ListProjectsContract = defineQuery({
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
238
|
+
meta: {
|
|
239
|
+
key: 'saas.project.list',
|
|
240
|
+
version: '1.0.0',
|
|
241
|
+
stability: 'stable',
|
|
242
|
+
owners: [...OWNERS],
|
|
243
|
+
tags: ['saas', 'project', 'list'],
|
|
244
|
+
description: 'List projects in the organization.',
|
|
245
|
+
goal: 'Show all projects user has access to.',
|
|
246
|
+
context: 'Project list page, dashboard.',
|
|
247
|
+
},
|
|
248
|
+
io: {
|
|
249
|
+
input: ListProjectsInputModel,
|
|
250
|
+
output: ListProjectsOutputModel,
|
|
251
|
+
},
|
|
252
|
+
policy: {
|
|
253
|
+
auth: 'user',
|
|
254
|
+
},
|
|
255
|
+
acceptance: {
|
|
256
|
+
scenarios: [
|
|
257
|
+
{
|
|
258
|
+
key: 'list-projects-happy-path',
|
|
259
|
+
given: ['Projects exist'],
|
|
260
|
+
when: ['User lists projects'],
|
|
261
|
+
then: ['List of projects is returned'],
|
|
262
|
+
},
|
|
263
|
+
],
|
|
264
|
+
examples: [
|
|
265
|
+
{
|
|
266
|
+
key: 'list-all',
|
|
267
|
+
input: { limit: 10 },
|
|
268
|
+
output: { items: [], total: 5 },
|
|
269
|
+
},
|
|
270
|
+
],
|
|
271
|
+
},
|
|
272
272
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
definePresentation,
|
|
3
|
+
StabilityEnum,
|
|
4
4
|
} from '@contractspec/lib.contracts-spec';
|
|
5
5
|
import { ProjectModel } from './project.schema';
|
|
6
6
|
|
|
@@ -8,54 +8,54 @@ import { ProjectModel } from './project.schema';
|
|
|
8
8
|
* Presentation for displaying a list of projects.
|
|
9
9
|
*/
|
|
10
10
|
export const ProjectListPresentation = definePresentation({
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
11
|
+
meta: {
|
|
12
|
+
key: 'saas.project.list',
|
|
13
|
+
version: '1.0.0',
|
|
14
|
+
title: 'Project List',
|
|
15
|
+
description:
|
|
16
|
+
'List view of projects with status, tags, and last updated info',
|
|
17
|
+
domain: 'saas-boilerplate',
|
|
18
|
+
owners: ['@saas-team'],
|
|
19
|
+
tags: ['project', 'list', 'dashboard'],
|
|
20
|
+
stability: StabilityEnum.Beta,
|
|
21
|
+
goal: 'Browse and manage projects',
|
|
22
|
+
context: 'Project list page',
|
|
23
|
+
},
|
|
24
|
+
source: {
|
|
25
|
+
type: 'component',
|
|
26
|
+
framework: 'react',
|
|
27
|
+
componentKey: 'ProjectListView',
|
|
28
|
+
props: ProjectModel,
|
|
29
|
+
},
|
|
30
|
+
targets: ['react', 'markdown', 'application/json'],
|
|
31
|
+
policy: {
|
|
32
|
+
flags: ['saas.projects.enabled'],
|
|
33
|
+
},
|
|
34
34
|
});
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* Presentation for project detail view.
|
|
38
38
|
*/
|
|
39
39
|
export const ProjectDetailPresentation = definePresentation({
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
40
|
+
meta: {
|
|
41
|
+
key: 'saas.project.detail',
|
|
42
|
+
version: '1.0.0',
|
|
43
|
+
title: 'Project Details',
|
|
44
|
+
description: 'Detailed view of a project with settings and activity',
|
|
45
|
+
domain: 'saas-boilerplate',
|
|
46
|
+
owners: ['@saas-team'],
|
|
47
|
+
tags: ['project', 'detail'],
|
|
48
|
+
stability: StabilityEnum.Beta,
|
|
49
|
+
goal: 'View and edit project details',
|
|
50
|
+
context: 'Project detail page',
|
|
51
|
+
},
|
|
52
|
+
source: {
|
|
53
|
+
type: 'component',
|
|
54
|
+
framework: 'react',
|
|
55
|
+
componentKey: 'ProjectDetailView',
|
|
56
|
+
},
|
|
57
|
+
targets: ['react', 'markdown'],
|
|
58
|
+
policy: {
|
|
59
|
+
flags: ['saas.projects.enabled'],
|
|
60
|
+
},
|
|
61
61
|
});
|