@contractspec/example.saas-boilerplate 1.46.1 → 1.48.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$colon$bundle.log +183 -108
- package/.turbo/turbo-build.log +182 -107
- package/CHANGELOG.md +64 -0
- package/README.md +0 -1
- package/dist/billing/billing.event.d.ts +4 -4
- package/dist/billing/billing.event.js +1 -1
- package/dist/billing/billing.operations.d.ts +5 -5
- package/dist/billing/billing.presentation.d.ts +3 -4
- package/dist/billing/billing.presentation.d.ts.map +1 -1
- package/dist/billing/billing.presentation.js +5 -5
- package/dist/billing/billing.presentation.js.map +1 -1
- package/dist/dashboard/dashboard.presentation.d.ts +3 -4
- package/dist/dashboard/dashboard.presentation.d.ts.map +1 -1
- package/dist/dashboard/dashboard.presentation.js +5 -5
- package/dist/dashboard/dashboard.presentation.js.map +1 -1
- package/dist/example.d.ts +2 -2
- package/dist/example.d.ts.map +1 -1
- package/dist/example.js +4 -2
- package/dist/example.js.map +1 -1
- package/dist/handlers/index.d.ts +2 -1
- package/dist/handlers/index.js +2 -1
- package/dist/handlers/saas.handlers.d.ts +68 -0
- package/dist/handlers/saas.handlers.d.ts.map +1 -0
- package/dist/handlers/saas.handlers.js +148 -0
- package/dist/handlers/saas.handlers.js.map +1 -0
- package/dist/index.d.ts +13 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/dist/project/project.enum.d.ts +3 -3
- package/dist/project/project.event.d.ts +22 -22
- package/dist/project/project.event.d.ts.map +1 -1
- package/dist/project/project.event.js +1 -1
- package/dist/project/project.operations.d.ts +103 -103
- package/dist/project/project.presentation.d.ts +3 -4
- package/dist/project/project.presentation.d.ts.map +1 -1
- package/dist/project/project.presentation.js +5 -5
- package/dist/project/project.presentation.js.map +1 -1
- package/dist/project/project.schema.d.ts +54 -54
- package/dist/saas-boilerplate.feature.d.ts +2 -2
- package/dist/saas-boilerplate.feature.d.ts.map +1 -1
- package/dist/saas-boilerplate.feature.js +9 -2
- package/dist/saas-boilerplate.feature.js.map +1 -1
- package/dist/seeders/index.d.ts +10 -0
- package/dist/seeders/index.d.ts.map +1 -0
- package/dist/seeders/index.js +19 -0
- package/dist/seeders/index.js.map +1 -0
- package/dist/settings/settings.entity.d.ts +24 -24
- package/dist/settings/settings.enum.d.ts +2 -2
- package/dist/shared/overlay-types.d.ts +34 -0
- package/dist/shared/overlay-types.d.ts.map +1 -0
- package/dist/shared/overlay-types.js +0 -0
- package/dist/tests/operations.test-spec.d.ts +10 -0
- package/dist/tests/operations.test-spec.d.ts.map +1 -0
- package/dist/tests/operations.test-spec.js +123 -0
- package/dist/tests/operations.test-spec.js.map +1 -0
- package/dist/ui/SaasDashboard.d.ts +7 -0
- package/dist/ui/SaasDashboard.d.ts.map +1 -0
- package/dist/ui/SaasDashboard.js +298 -0
- package/dist/ui/SaasDashboard.js.map +1 -0
- package/dist/ui/SaasProjectList.d.ts +14 -0
- package/dist/ui/SaasProjectList.d.ts.map +1 -0
- package/dist/ui/SaasProjectList.js +76 -0
- package/dist/ui/SaasProjectList.js.map +1 -0
- package/dist/ui/SaasSettingsPanel.d.ts +7 -0
- package/dist/ui/SaasSettingsPanel.d.ts.map +1 -0
- package/dist/ui/SaasSettingsPanel.js +138 -0
- package/dist/ui/SaasSettingsPanel.js.map +1 -0
- package/dist/ui/hooks/index.d.ts +3 -0
- package/dist/ui/hooks/index.js +6 -0
- package/dist/ui/hooks/useProjectList.d.ts +34 -0
- package/dist/ui/hooks/useProjectList.d.ts.map +1 -0
- package/dist/ui/hooks/useProjectList.js +75 -0
- package/dist/ui/hooks/useProjectList.js.map +1 -0
- package/dist/ui/hooks/useProjectMutations.d.ts +28 -0
- package/dist/ui/hooks/useProjectMutations.d.ts.map +1 -0
- package/dist/ui/hooks/useProjectMutations.js +146 -0
- package/dist/ui/hooks/useProjectMutations.js.map +1 -0
- package/dist/ui/index.d.ts +14 -0
- package/dist/ui/index.js +15 -0
- package/dist/ui/modals/CreateProjectModal.d.ts +23 -0
- package/dist/ui/modals/CreateProjectModal.d.ts.map +1 -0
- package/dist/ui/modals/CreateProjectModal.js +139 -0
- package/dist/ui/modals/CreateProjectModal.js.map +1 -0
- package/dist/ui/modals/ProjectActionsModal.d.ts +38 -0
- package/dist/ui/modals/ProjectActionsModal.d.ts.map +1 -0
- package/dist/ui/modals/ProjectActionsModal.js +292 -0
- package/dist/ui/modals/ProjectActionsModal.js.map +1 -0
- package/dist/ui/modals/index.d.ts +3 -0
- package/dist/ui/modals/index.js +4 -0
- package/dist/ui/overlays/demo-overlays.d.ts +19 -0
- package/dist/ui/overlays/demo-overlays.d.ts.map +1 -0
- package/dist/ui/overlays/demo-overlays.js +70 -0
- package/dist/ui/overlays/demo-overlays.js.map +1 -0
- package/dist/ui/overlays/index.d.ts +2 -0
- package/dist/ui/overlays/index.js +3 -0
- package/dist/ui/renderers/index.d.ts +3 -0
- package/dist/ui/renderers/index.js +4 -0
- package/dist/ui/renderers/project-list.markdown.d.ts +31 -0
- package/dist/ui/renderers/project-list.markdown.d.ts.map +1 -0
- package/dist/ui/renderers/project-list.markdown.js +148 -0
- package/dist/ui/renderers/project-list.markdown.js.map +1 -0
- package/dist/ui/renderers/project-list.renderer.d.ts +9 -0
- package/dist/ui/renderers/project-list.renderer.d.ts.map +1 -0
- package/dist/ui/renderers/project-list.renderer.js +17 -0
- package/dist/ui/renderers/project-list.renderer.js.map +1 -0
- package/package.json +38 -14
- package/src/billing/billing.presentation.ts +5 -6
- package/src/dashboard/dashboard.presentation.ts +5 -6
- package/src/example.ts +3 -3
- package/src/handlers/index.ts +3 -0
- package/src/handlers/saas.handlers.ts +300 -0
- package/src/index.ts +5 -0
- package/src/project/project.presentation.ts +5 -6
- package/src/saas-boilerplate.feature.ts +3 -3
- package/src/seeders/index.ts +28 -0
- package/src/shared/overlay-types.ts +39 -0
- package/src/tests/operations.test-spec.ts +109 -0
- package/src/ui/SaasDashboard.tsx +325 -0
- package/src/ui/SaasProjectList.tsx +113 -0
- package/src/ui/SaasSettingsPanel.tsx +96 -0
- package/src/ui/hooks/index.ts +10 -0
- package/src/ui/hooks/useProjectList.ts +95 -0
- package/src/ui/hooks/useProjectMutations.ts +166 -0
- package/src/ui/index.ts +18 -0
- package/src/ui/modals/CreateProjectModal.tsx +176 -0
- package/src/ui/modals/ProjectActionsModal.tsx +346 -0
- package/src/ui/modals/index.ts +2 -0
- package/src/ui/overlays/demo-overlays.ts +74 -0
- package/src/ui/overlays/index.ts +1 -0
- package/src/ui/renderers/index.ts +7 -0
- package/src/ui/renderers/project-list.markdown.ts +239 -0
- package/src/ui/renderers/project-list.renderer.tsx +22 -0
- package/tsconfig.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _contractspec_lib_schema293 from "@contractspec/lib.schema";
|
|
2
2
|
|
|
3
3
|
//#region src/project/project.schema.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* A project within an organization.
|
|
6
6
|
*/
|
|
7
|
-
declare const ProjectModel:
|
|
7
|
+
declare const ProjectModel: _contractspec_lib_schema293.SchemaModel<{
|
|
8
8
|
id: {
|
|
9
|
-
type:
|
|
9
|
+
type: _contractspec_lib_schema293.FieldType<string, string>;
|
|
10
10
|
isOptional: false;
|
|
11
11
|
};
|
|
12
12
|
name: {
|
|
13
|
-
type:
|
|
13
|
+
type: _contractspec_lib_schema293.FieldType<string, string>;
|
|
14
14
|
isOptional: false;
|
|
15
15
|
};
|
|
16
16
|
description: {
|
|
17
|
-
type:
|
|
17
|
+
type: _contractspec_lib_schema293.FieldType<string, string>;
|
|
18
18
|
isOptional: true;
|
|
19
19
|
};
|
|
20
20
|
slug: {
|
|
21
|
-
type:
|
|
21
|
+
type: _contractspec_lib_schema293.FieldType<string, string>;
|
|
22
22
|
isOptional: true;
|
|
23
23
|
};
|
|
24
24
|
organizationId: {
|
|
25
|
-
type:
|
|
25
|
+
type: _contractspec_lib_schema293.FieldType<string, string>;
|
|
26
26
|
isOptional: false;
|
|
27
27
|
};
|
|
28
28
|
createdBy: {
|
|
29
|
-
type:
|
|
29
|
+
type: _contractspec_lib_schema293.FieldType<string, string>;
|
|
30
30
|
isOptional: false;
|
|
31
31
|
};
|
|
32
32
|
status: {
|
|
33
|
-
type:
|
|
33
|
+
type: _contractspec_lib_schema293.EnumType<[string, string, string, string]>;
|
|
34
34
|
isOptional: false;
|
|
35
35
|
};
|
|
36
36
|
isPublic: {
|
|
37
|
-
type:
|
|
37
|
+
type: _contractspec_lib_schema293.FieldType<boolean, boolean>;
|
|
38
38
|
isOptional: false;
|
|
39
39
|
};
|
|
40
40
|
tags: {
|
|
41
|
-
type:
|
|
41
|
+
type: _contractspec_lib_schema293.FieldType<string, string>;
|
|
42
42
|
isArray: true;
|
|
43
43
|
isOptional: false;
|
|
44
44
|
};
|
|
45
45
|
createdAt: {
|
|
46
|
-
type:
|
|
46
|
+
type: _contractspec_lib_schema293.FieldType<Date, string>;
|
|
47
47
|
isOptional: false;
|
|
48
48
|
};
|
|
49
49
|
updatedAt: {
|
|
50
|
-
type:
|
|
50
|
+
type: _contractspec_lib_schema293.FieldType<Date, string>;
|
|
51
51
|
isOptional: false;
|
|
52
52
|
};
|
|
53
53
|
}>;
|
|
54
54
|
/**
|
|
55
55
|
* Input for creating a project.
|
|
56
56
|
*/
|
|
57
|
-
declare const CreateProjectInputModel:
|
|
57
|
+
declare const CreateProjectInputModel: _contractspec_lib_schema293.SchemaModel<{
|
|
58
58
|
name: {
|
|
59
|
-
type:
|
|
59
|
+
type: _contractspec_lib_schema293.FieldType<string, string>;
|
|
60
60
|
isOptional: false;
|
|
61
61
|
};
|
|
62
62
|
description: {
|
|
63
|
-
type:
|
|
63
|
+
type: _contractspec_lib_schema293.FieldType<string, string>;
|
|
64
64
|
isOptional: true;
|
|
65
65
|
};
|
|
66
66
|
slug: {
|
|
67
|
-
type:
|
|
67
|
+
type: _contractspec_lib_schema293.FieldType<string, string>;
|
|
68
68
|
isOptional: true;
|
|
69
69
|
};
|
|
70
70
|
isPublic: {
|
|
71
|
-
type:
|
|
71
|
+
type: _contractspec_lib_schema293.FieldType<boolean, boolean>;
|
|
72
72
|
isOptional: true;
|
|
73
73
|
};
|
|
74
74
|
tags: {
|
|
75
|
-
type:
|
|
75
|
+
type: _contractspec_lib_schema293.FieldType<string, string>;
|
|
76
76
|
isArray: true;
|
|
77
77
|
isOptional: true;
|
|
78
78
|
};
|
|
@@ -80,92 +80,92 @@ declare const CreateProjectInputModel: _contractspec_lib_schema194.SchemaModel<{
|
|
|
80
80
|
/**
|
|
81
81
|
* Input for updating a project.
|
|
82
82
|
*/
|
|
83
|
-
declare const UpdateProjectInputModel:
|
|
83
|
+
declare const UpdateProjectInputModel: _contractspec_lib_schema293.SchemaModel<{
|
|
84
84
|
projectId: {
|
|
85
|
-
type:
|
|
85
|
+
type: _contractspec_lib_schema293.FieldType<string, string>;
|
|
86
86
|
isOptional: false;
|
|
87
87
|
};
|
|
88
88
|
name: {
|
|
89
|
-
type:
|
|
89
|
+
type: _contractspec_lib_schema293.FieldType<string, string>;
|
|
90
90
|
isOptional: true;
|
|
91
91
|
};
|
|
92
92
|
description: {
|
|
93
|
-
type:
|
|
93
|
+
type: _contractspec_lib_schema293.FieldType<string, string>;
|
|
94
94
|
isOptional: true;
|
|
95
95
|
};
|
|
96
96
|
slug: {
|
|
97
|
-
type:
|
|
97
|
+
type: _contractspec_lib_schema293.FieldType<string, string>;
|
|
98
98
|
isOptional: true;
|
|
99
99
|
};
|
|
100
100
|
isPublic: {
|
|
101
|
-
type:
|
|
101
|
+
type: _contractspec_lib_schema293.FieldType<boolean, boolean>;
|
|
102
102
|
isOptional: true;
|
|
103
103
|
};
|
|
104
104
|
tags: {
|
|
105
|
-
type:
|
|
105
|
+
type: _contractspec_lib_schema293.FieldType<string, string>;
|
|
106
106
|
isArray: true;
|
|
107
107
|
isOptional: true;
|
|
108
108
|
};
|
|
109
109
|
status: {
|
|
110
|
-
type:
|
|
110
|
+
type: _contractspec_lib_schema293.EnumType<[string, string, string, string]>;
|
|
111
111
|
isOptional: true;
|
|
112
112
|
};
|
|
113
113
|
}>;
|
|
114
114
|
/**
|
|
115
115
|
* Input for getting a project.
|
|
116
116
|
*/
|
|
117
|
-
declare const GetProjectInputModel:
|
|
117
|
+
declare const GetProjectInputModel: _contractspec_lib_schema293.SchemaModel<{
|
|
118
118
|
projectId: {
|
|
119
|
-
type:
|
|
119
|
+
type: _contractspec_lib_schema293.FieldType<string, string>;
|
|
120
120
|
isOptional: false;
|
|
121
121
|
};
|
|
122
122
|
}>;
|
|
123
123
|
/**
|
|
124
124
|
* Input for deleting a project.
|
|
125
125
|
*/
|
|
126
|
-
declare const DeleteProjectInputModel:
|
|
126
|
+
declare const DeleteProjectInputModel: _contractspec_lib_schema293.SchemaModel<{
|
|
127
127
|
projectId: {
|
|
128
|
-
type:
|
|
128
|
+
type: _contractspec_lib_schema293.FieldType<string, string>;
|
|
129
129
|
isOptional: false;
|
|
130
130
|
};
|
|
131
131
|
}>;
|
|
132
132
|
/**
|
|
133
133
|
* Output for delete operation.
|
|
134
134
|
*/
|
|
135
|
-
declare const DeleteProjectOutputModel:
|
|
135
|
+
declare const DeleteProjectOutputModel: _contractspec_lib_schema293.SchemaModel<{
|
|
136
136
|
success: {
|
|
137
|
-
type:
|
|
137
|
+
type: _contractspec_lib_schema293.FieldType<boolean, boolean>;
|
|
138
138
|
isOptional: false;
|
|
139
139
|
};
|
|
140
140
|
}>;
|
|
141
141
|
/**
|
|
142
142
|
* Payload for project deleted event.
|
|
143
143
|
*/
|
|
144
|
-
declare const ProjectDeletedPayloadModel:
|
|
144
|
+
declare const ProjectDeletedPayloadModel: _contractspec_lib_schema293.SchemaModel<{
|
|
145
145
|
projectId: {
|
|
146
|
-
type:
|
|
146
|
+
type: _contractspec_lib_schema293.FieldType<string, string>;
|
|
147
147
|
isOptional: false;
|
|
148
148
|
};
|
|
149
149
|
}>;
|
|
150
150
|
/**
|
|
151
151
|
* Input for listing projects.
|
|
152
152
|
*/
|
|
153
|
-
declare const ListProjectsInputModel:
|
|
153
|
+
declare const ListProjectsInputModel: _contractspec_lib_schema293.SchemaModel<{
|
|
154
154
|
status: {
|
|
155
|
-
type:
|
|
155
|
+
type: _contractspec_lib_schema293.EnumType<[string, string, string, string]>;
|
|
156
156
|
isOptional: true;
|
|
157
157
|
};
|
|
158
158
|
search: {
|
|
159
|
-
type:
|
|
159
|
+
type: _contractspec_lib_schema293.FieldType<string, string>;
|
|
160
160
|
isOptional: true;
|
|
161
161
|
};
|
|
162
162
|
limit: {
|
|
163
|
-
type:
|
|
163
|
+
type: _contractspec_lib_schema293.FieldType<number, number>;
|
|
164
164
|
isOptional: true;
|
|
165
165
|
defaultValue: number;
|
|
166
166
|
};
|
|
167
167
|
offset: {
|
|
168
|
-
type:
|
|
168
|
+
type: _contractspec_lib_schema293.FieldType<number, number>;
|
|
169
169
|
isOptional: true;
|
|
170
170
|
defaultValue: number;
|
|
171
171
|
};
|
|
@@ -173,52 +173,52 @@ declare const ListProjectsInputModel: _contractspec_lib_schema194.SchemaModel<{
|
|
|
173
173
|
/**
|
|
174
174
|
* Output for listing projects.
|
|
175
175
|
*/
|
|
176
|
-
declare const ListProjectsOutputModel:
|
|
176
|
+
declare const ListProjectsOutputModel: _contractspec_lib_schema293.SchemaModel<{
|
|
177
177
|
projects: {
|
|
178
|
-
type:
|
|
178
|
+
type: _contractspec_lib_schema293.SchemaModel<{
|
|
179
179
|
id: {
|
|
180
|
-
type:
|
|
180
|
+
type: _contractspec_lib_schema293.FieldType<string, string>;
|
|
181
181
|
isOptional: false;
|
|
182
182
|
};
|
|
183
183
|
name: {
|
|
184
|
-
type:
|
|
184
|
+
type: _contractspec_lib_schema293.FieldType<string, string>;
|
|
185
185
|
isOptional: false;
|
|
186
186
|
};
|
|
187
187
|
description: {
|
|
188
|
-
type:
|
|
188
|
+
type: _contractspec_lib_schema293.FieldType<string, string>;
|
|
189
189
|
isOptional: true;
|
|
190
190
|
};
|
|
191
191
|
slug: {
|
|
192
|
-
type:
|
|
192
|
+
type: _contractspec_lib_schema293.FieldType<string, string>;
|
|
193
193
|
isOptional: true;
|
|
194
194
|
};
|
|
195
195
|
organizationId: {
|
|
196
|
-
type:
|
|
196
|
+
type: _contractspec_lib_schema293.FieldType<string, string>;
|
|
197
197
|
isOptional: false;
|
|
198
198
|
};
|
|
199
199
|
createdBy: {
|
|
200
|
-
type:
|
|
200
|
+
type: _contractspec_lib_schema293.FieldType<string, string>;
|
|
201
201
|
isOptional: false;
|
|
202
202
|
};
|
|
203
203
|
status: {
|
|
204
|
-
type:
|
|
204
|
+
type: _contractspec_lib_schema293.EnumType<[string, string, string, string]>;
|
|
205
205
|
isOptional: false;
|
|
206
206
|
};
|
|
207
207
|
isPublic: {
|
|
208
|
-
type:
|
|
208
|
+
type: _contractspec_lib_schema293.FieldType<boolean, boolean>;
|
|
209
209
|
isOptional: false;
|
|
210
210
|
};
|
|
211
211
|
tags: {
|
|
212
|
-
type:
|
|
212
|
+
type: _contractspec_lib_schema293.FieldType<string, string>;
|
|
213
213
|
isArray: true;
|
|
214
214
|
isOptional: false;
|
|
215
215
|
};
|
|
216
216
|
createdAt: {
|
|
217
|
-
type:
|
|
217
|
+
type: _contractspec_lib_schema293.FieldType<Date, string>;
|
|
218
218
|
isOptional: false;
|
|
219
219
|
};
|
|
220
220
|
updatedAt: {
|
|
221
|
-
type:
|
|
221
|
+
type: _contractspec_lib_schema293.FieldType<Date, string>;
|
|
222
222
|
isOptional: false;
|
|
223
223
|
};
|
|
224
224
|
}>;
|
|
@@ -226,7 +226,7 @@ declare const ListProjectsOutputModel: _contractspec_lib_schema194.SchemaModel<{
|
|
|
226
226
|
isOptional: false;
|
|
227
227
|
};
|
|
228
228
|
total: {
|
|
229
|
-
type:
|
|
229
|
+
type: _contractspec_lib_schema293.FieldType<number, number>;
|
|
230
230
|
isOptional: false;
|
|
231
231
|
};
|
|
232
232
|
}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as _contractspec_lib_contracts0 from "@contractspec/lib.contracts";
|
|
2
2
|
|
|
3
3
|
//#region src/saas-boilerplate.feature.d.ts
|
|
4
4
|
|
|
@@ -6,7 +6,7 @@ import { FeatureModuleSpec } from "@contractspec/lib.contracts";
|
|
|
6
6
|
* SaaS Boilerplate feature module that bundles project management,
|
|
7
7
|
* billing, and settings operations into an installable feature.
|
|
8
8
|
*/
|
|
9
|
-
declare const SaasBoilerplateFeature: FeatureModuleSpec;
|
|
9
|
+
declare const SaasBoilerplateFeature: _contractspec_lib_contracts0.FeatureModuleSpec;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { SaasBoilerplateFeature };
|
|
12
12
|
//# sourceMappingURL=saas-boilerplate.feature.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"saas-boilerplate.feature.d.ts","names":[],"sources":["../src/saas-boilerplate.feature.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"saas-boilerplate.feature.d.ts","names":[],"sources":["../src/saas-boilerplate.feature.ts"],"sourcesContent":[],"mappings":";;;;;;;AAWA;cAAa,wBAqGX,4BAAA,CArGiC"}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
+
import { defineFeature } from "@contractspec/lib.contracts";
|
|
2
|
+
|
|
1
3
|
//#region src/saas-boilerplate.feature.ts
|
|
2
4
|
/**
|
|
5
|
+
* SaaS Boilerplate Feature Module Specification
|
|
6
|
+
*
|
|
7
|
+
* Defines the feature module for the SaaS application foundation.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
3
10
|
* SaaS Boilerplate feature module that bundles project management,
|
|
4
11
|
* billing, and settings operations into an installable feature.
|
|
5
12
|
*/
|
|
6
|
-
const SaasBoilerplateFeature = {
|
|
13
|
+
const SaasBoilerplateFeature = defineFeature({
|
|
7
14
|
meta: {
|
|
8
15
|
key: "saas-boilerplate",
|
|
9
16
|
title: "SaaS Boilerplate",
|
|
@@ -194,7 +201,7 @@ const SaasBoilerplateFeature = {
|
|
|
194
201
|
version: "1.0.0"
|
|
195
202
|
}
|
|
196
203
|
] }
|
|
197
|
-
};
|
|
204
|
+
});
|
|
198
205
|
|
|
199
206
|
//#endregion
|
|
200
207
|
export { SaasBoilerplateFeature };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"saas-boilerplate.feature.js","names":[
|
|
1
|
+
{"version":3,"file":"saas-boilerplate.feature.js","names":[],"sources":["../src/saas-boilerplate.feature.ts"],"sourcesContent":["/**\n * SaaS Boilerplate Feature Module Specification\n *\n * Defines the feature module for the SaaS application foundation.\n */\nimport { defineFeature } from '@contractspec/lib.contracts';\n\n/**\n * SaaS Boilerplate feature module that bundles project management,\n * billing, and settings operations into an installable feature.\n */\nexport const SaasBoilerplateFeature = defineFeature({\n meta: {\n key: 'saas-boilerplate',\n title: 'SaaS Boilerplate',\n description:\n 'SaaS application foundation with projects, billing, and settings',\n domain: 'saas',\n owners: ['@saas-team'],\n tags: ['saas', 'projects', 'billing'],\n stability: 'experimental',\n version: '1.0.0',\n },\n\n // All contract operations included in this feature\n operations: [\n // Project operations\n { key: 'saas.project.create', version: '1.0.0' },\n { key: 'saas.project.get', version: '1.0.0' },\n { key: 'saas.project.update', version: '1.0.0' },\n { key: 'saas.project.delete', version: '1.0.0' },\n { key: 'saas.project.list', version: '1.0.0' },\n\n // Billing operations\n { key: 'saas.billing.subscription.get', version: '1.0.0' },\n { key: 'saas.billing.usage.record', version: '1.0.0' },\n { key: 'saas.billing.usage.summary', version: '1.0.0' },\n { key: 'saas.billing.feature.check', version: '1.0.0' },\n ],\n\n // Events emitted by this feature\n events: [\n // Project events\n { key: 'project.created', version: '1.0.0' },\n { key: 'project.updated', version: '1.0.0' },\n { key: 'project.deleted', version: '1.0.0' },\n { key: 'project.archived', version: '1.0.0' },\n\n // Billing events\n { key: 'billing.usage.recorded', version: '1.0.0' },\n { key: 'billing.subscription.changed', version: '1.0.0' },\n { key: 'billing.limit.reached', version: '1.0.0' },\n ],\n\n // Presentations associated with this feature\n presentations: [\n { key: 'saas.dashboard', version: '1.0.0' },\n { key: 'saas.project.list', version: '1.0.0' },\n { key: 'saas.project.detail', version: '1.0.0' },\n { key: 'saas.billing.subscription', version: '1.0.0' },\n { key: 'saas.billing.usage', version: '1.0.0' },\n { key: 'saas.settings', version: '1.0.0' },\n ],\n\n // Link operations to their primary presentations\n opToPresentation: [\n {\n op: { key: 'saas.project.list', version: '1.0.0' },\n pres: { key: 'saas.project.list', version: '1.0.0' },\n },\n {\n op: { key: 'saas.project.get', version: '1.0.0' },\n pres: { key: 'saas.project.detail', version: '1.0.0' },\n },\n {\n op: { key: 'saas.billing.subscription.get', version: '1.0.0' },\n pres: { key: 'saas.billing.subscription', version: '1.0.0' },\n },\n {\n op: { key: 'saas.billing.usage.summary', version: '1.0.0' },\n pres: { key: 'saas.billing.usage', version: '1.0.0' },\n },\n ],\n\n // Target requirements for multi-surface rendering\n presentationsTargets: [\n { key: 'saas.dashboard', version: '1.0.0', targets: ['react', 'markdown'] },\n {\n key: 'saas.project.list',\n version: '1.0.0',\n targets: ['react', 'markdown', 'application/json'],\n },\n {\n key: 'saas.billing.subscription',\n version: '1.0.0',\n targets: ['react', 'markdown'],\n },\n {\n key: 'saas.billing.usage',\n version: '1.0.0',\n targets: ['react', 'markdown'],\n },\n ],\n\n // Capability requirements\n capabilities: {\n requires: [\n { key: 'identity', version: '1.0.0' },\n { key: 'audit-trail', version: '1.0.0' },\n { key: 'notifications', version: '1.0.0' },\n ],\n },\n});\n"],"mappings":";;;;;;;;;;;;AAWA,MAAa,yBAAyB,cAAc;CAClD,MAAM;EACJ,KAAK;EACL,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,aAAa;EACtB,MAAM;GAAC;GAAQ;GAAY;GAAU;EACrC,WAAW;EACX,SAAS;EACV;CAGD,YAAY;EAEV;GAAE,KAAK;GAAuB,SAAS;GAAS;EAChD;GAAE,KAAK;GAAoB,SAAS;GAAS;EAC7C;GAAE,KAAK;GAAuB,SAAS;GAAS;EAChD;GAAE,KAAK;GAAuB,SAAS;GAAS;EAChD;GAAE,KAAK;GAAqB,SAAS;GAAS;EAG9C;GAAE,KAAK;GAAiC,SAAS;GAAS;EAC1D;GAAE,KAAK;GAA6B,SAAS;GAAS;EACtD;GAAE,KAAK;GAA8B,SAAS;GAAS;EACvD;GAAE,KAAK;GAA8B,SAAS;GAAS;EACxD;CAGD,QAAQ;EAEN;GAAE,KAAK;GAAmB,SAAS;GAAS;EAC5C;GAAE,KAAK;GAAmB,SAAS;GAAS;EAC5C;GAAE,KAAK;GAAmB,SAAS;GAAS;EAC5C;GAAE,KAAK;GAAoB,SAAS;GAAS;EAG7C;GAAE,KAAK;GAA0B,SAAS;GAAS;EACnD;GAAE,KAAK;GAAgC,SAAS;GAAS;EACzD;GAAE,KAAK;GAAyB,SAAS;GAAS;EACnD;CAGD,eAAe;EACb;GAAE,KAAK;GAAkB,SAAS;GAAS;EAC3C;GAAE,KAAK;GAAqB,SAAS;GAAS;EAC9C;GAAE,KAAK;GAAuB,SAAS;GAAS;EAChD;GAAE,KAAK;GAA6B,SAAS;GAAS;EACtD;GAAE,KAAK;GAAsB,SAAS;GAAS;EAC/C;GAAE,KAAK;GAAiB,SAAS;GAAS;EAC3C;CAGD,kBAAkB;EAChB;GACE,IAAI;IAAE,KAAK;IAAqB,SAAS;IAAS;GAClD,MAAM;IAAE,KAAK;IAAqB,SAAS;IAAS;GACrD;EACD;GACE,IAAI;IAAE,KAAK;IAAoB,SAAS;IAAS;GACjD,MAAM;IAAE,KAAK;IAAuB,SAAS;IAAS;GACvD;EACD;GACE,IAAI;IAAE,KAAK;IAAiC,SAAS;IAAS;GAC9D,MAAM;IAAE,KAAK;IAA6B,SAAS;IAAS;GAC7D;EACD;GACE,IAAI;IAAE,KAAK;IAA8B,SAAS;IAAS;GAC3D,MAAM;IAAE,KAAK;IAAsB,SAAS;IAAS;GACtD;EACF;CAGD,sBAAsB;EACpB;GAAE,KAAK;GAAkB,SAAS;GAAS,SAAS,CAAC,SAAS,WAAW;GAAE;EAC3E;GACE,KAAK;GACL,SAAS;GACT,SAAS;IAAC;IAAS;IAAY;IAAmB;GACnD;EACD;GACE,KAAK;GACL,SAAS;GACT,SAAS,CAAC,SAAS,WAAW;GAC/B;EACD;GACE,KAAK;GACL,SAAS;GACT,SAAS,CAAC,SAAS,WAAW;GAC/B;EACF;CAGD,cAAc,EACZ,UAAU;EACR;GAAE,KAAK;GAAY,SAAS;GAAS;EACrC;GAAE,KAAK;GAAe,SAAS;GAAS;EACxC;GAAE,KAAK;GAAiB,SAAS;GAAS;EAC3C,EACF;CACF,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DatabasePort } from "@contractspec/lib.runtime-sandbox";
|
|
2
|
+
|
|
3
|
+
//#region src/seeders/index.d.ts
|
|
4
|
+
declare function seedSaasBoilerplate(params: {
|
|
5
|
+
projectId: string;
|
|
6
|
+
db: DatabasePort;
|
|
7
|
+
}): Promise<void>;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { seedSaasBoilerplate };
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/seeders/index.ts"],"sourcesContent":[],"mappings":";;;iBAEsB,mBAAA;;EAAA,EAAA,EAEhB,YAFgB;IAGrB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//#region src/seeders/index.ts
|
|
2
|
+
async function seedSaasBoilerplate(params) {
|
|
3
|
+
const { projectId, db } = params;
|
|
4
|
+
if ((await db.query(`SELECT COUNT(*) as count FROM saas_project WHERE "projectId" = $1`, [projectId])).rows[0]?.count > 0) return;
|
|
5
|
+
await db.execute(`INSERT INTO saas_project (id, "projectId", "organizationId", name, description, status, tier)
|
|
6
|
+
VALUES ($1, $2, $3, $4, $5, $6, $7)`, [
|
|
7
|
+
"saas_proj_1",
|
|
8
|
+
projectId,
|
|
9
|
+
"org_demo",
|
|
10
|
+
"Demo Project",
|
|
11
|
+
"A demo SaaS project",
|
|
12
|
+
"ACTIVE",
|
|
13
|
+
"PRO"
|
|
14
|
+
]);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
export { seedSaasBoilerplate };
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/seeders/index.ts"],"sourcesContent":["import type { DatabasePort } from '@contractspec/lib.runtime-sandbox';\n\nexport async function seedSaasBoilerplate(params: {\n projectId: string;\n db: DatabasePort;\n}) {\n const { projectId, db } = params;\n\n const existing = await db.query(\n `SELECT COUNT(*) as count FROM saas_project WHERE \"projectId\" = $1`,\n [projectId]\n );\n if ((existing.rows[0]?.count as number) > 0) return;\n\n await db.execute(\n `INSERT INTO saas_project (id, \"projectId\", \"organizationId\", name, description, status, tier)\n VALUES ($1, $2, $3, $4, $5, $6, $7)`,\n [\n 'saas_proj_1',\n projectId,\n 'org_demo',\n 'Demo Project',\n 'A demo SaaS project',\n 'ACTIVE',\n 'PRO',\n ]\n );\n}\n"],"mappings":";AAEA,eAAsB,oBAAoB,QAGvC;CACD,MAAM,EAAE,WAAW,OAAO;AAM1B,MAJiB,MAAM,GAAG,MACxB,qEACA,CAAC,UAAU,CACZ,EACa,KAAK,IAAI,QAAmB,EAAG;AAE7C,OAAM,GAAG,QACP;2CAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CACF"}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _contractspec_lib_schema346 from "@contractspec/lib.schema";
|
|
2
2
|
|
|
3
3
|
//#region src/settings/settings.entity.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Settings entity - key-value configuration store.
|
|
6
6
|
*/
|
|
7
|
-
declare const SettingsEntity:
|
|
8
|
-
id:
|
|
9
|
-
key:
|
|
10
|
-
scope:
|
|
11
|
-
scopeId:
|
|
12
|
-
value:
|
|
13
|
-
valueType:
|
|
14
|
-
schema:
|
|
15
|
-
description:
|
|
16
|
-
isSecret:
|
|
17
|
-
createdAt:
|
|
18
|
-
updatedAt:
|
|
7
|
+
declare const SettingsEntity: _contractspec_lib_schema346.EntitySpec<{
|
|
8
|
+
id: _contractspec_lib_schema346.EntityScalarField;
|
|
9
|
+
key: _contractspec_lib_schema346.EntityScalarField;
|
|
10
|
+
scope: _contractspec_lib_schema346.EntityEnumField;
|
|
11
|
+
scopeId: _contractspec_lib_schema346.EntityScalarField;
|
|
12
|
+
value: _contractspec_lib_schema346.EntityScalarField;
|
|
13
|
+
valueType: _contractspec_lib_schema346.EntityScalarField;
|
|
14
|
+
schema: _contractspec_lib_schema346.EntityScalarField;
|
|
15
|
+
description: _contractspec_lib_schema346.EntityScalarField;
|
|
16
|
+
isSecret: _contractspec_lib_schema346.EntityScalarField;
|
|
17
|
+
createdAt: _contractspec_lib_schema346.EntityScalarField;
|
|
18
|
+
updatedAt: _contractspec_lib_schema346.EntityScalarField;
|
|
19
19
|
}>;
|
|
20
20
|
/**
|
|
21
21
|
* FeatureFlag entity - feature toggles.
|
|
22
22
|
*/
|
|
23
|
-
declare const FeatureFlagEntity:
|
|
24
|
-
id:
|
|
25
|
-
key:
|
|
26
|
-
name:
|
|
27
|
-
description:
|
|
28
|
-
enabled:
|
|
29
|
-
defaultValue:
|
|
30
|
-
rules:
|
|
31
|
-
rolloutPercentage:
|
|
32
|
-
createdAt:
|
|
33
|
-
updatedAt:
|
|
23
|
+
declare const FeatureFlagEntity: _contractspec_lib_schema346.EntitySpec<{
|
|
24
|
+
id: _contractspec_lib_schema346.EntityScalarField;
|
|
25
|
+
key: _contractspec_lib_schema346.EntityScalarField;
|
|
26
|
+
name: _contractspec_lib_schema346.EntityScalarField;
|
|
27
|
+
description: _contractspec_lib_schema346.EntityScalarField;
|
|
28
|
+
enabled: _contractspec_lib_schema346.EntityScalarField;
|
|
29
|
+
defaultValue: _contractspec_lib_schema346.EntityScalarField;
|
|
30
|
+
rules: _contractspec_lib_schema346.EntityScalarField;
|
|
31
|
+
rolloutPercentage: _contractspec_lib_schema346.EntityScalarField;
|
|
32
|
+
createdAt: _contractspec_lib_schema346.EntityScalarField;
|
|
33
|
+
updatedAt: _contractspec_lib_schema346.EntityScalarField;
|
|
34
34
|
}>;
|
|
35
35
|
//#endregion
|
|
36
36
|
export { FeatureFlagEntity, SettingsEntity };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _contractspec_lib_schema369 from "@contractspec/lib.schema";
|
|
2
2
|
|
|
3
3
|
//#region src/settings/settings.enum.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Settings scope enum.
|
|
6
6
|
*/
|
|
7
|
-
declare const SettingsScopeEnum:
|
|
7
|
+
declare const SettingsScopeEnum: _contractspec_lib_schema369.EntityEnumDef;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { SettingsScopeEnum };
|
|
10
10
|
//# sourceMappingURL=settings.enum.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
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[];
|
|
8
|
+
}
|
|
9
|
+
type OverlayModification = HideFieldModification | RenameLabelModification | AddBadgeModification | SetLimitModification;
|
|
10
|
+
interface HideFieldModification {
|
|
11
|
+
type: 'hideField';
|
|
12
|
+
field: string;
|
|
13
|
+
reason?: string;
|
|
14
|
+
}
|
|
15
|
+
interface RenameLabelModification {
|
|
16
|
+
type: 'renameLabel';
|
|
17
|
+
field: string;
|
|
18
|
+
newLabel: string;
|
|
19
|
+
}
|
|
20
|
+
interface AddBadgeModification {
|
|
21
|
+
type: 'addBadge';
|
|
22
|
+
position: 'header' | 'footer';
|
|
23
|
+
label: string;
|
|
24
|
+
variant: 'warning' | 'info' | 'error' | 'success' | 'default';
|
|
25
|
+
}
|
|
26
|
+
interface SetLimitModification {
|
|
27
|
+
type: 'setLimit';
|
|
28
|
+
field: string;
|
|
29
|
+
max: number;
|
|
30
|
+
message: string;
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { AddBadgeModification, HideFieldModification, OverlayDefinition, OverlayModification, RenameLabelModification, SetLimitModification };
|
|
34
|
+
//# sourceMappingURL=overlay-types.d.ts.map
|
|
@@ -0,0 +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"}
|
|
File without changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as _contractspec_lib_contracts21 from "@contractspec/lib.contracts";
|
|
2
|
+
|
|
3
|
+
//#region src/tests/operations.test-spec.d.ts
|
|
4
|
+
declare const ProjectListTest: _contractspec_lib_contracts21.TestSpec;
|
|
5
|
+
declare const ProjectGetTest: _contractspec_lib_contracts21.TestSpec;
|
|
6
|
+
declare const BillingSubscriptionGetTest: _contractspec_lib_contracts21.TestSpec;
|
|
7
|
+
declare const BillingUsageSummaryTest: _contractspec_lib_contracts21.TestSpec;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { BillingSubscriptionGetTest, BillingUsageSummaryTest, ProjectGetTest, ProjectListTest };
|
|
10
|
+
//# sourceMappingURL=operations.test-spec.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
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
|
+
}]
|
|
32
|
+
});
|
|
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
|
+
}]
|
|
61
|
+
});
|
|
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
|
+
}]
|
|
90
|
+
});
|
|
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
|
+
}]
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
//#endregion
|
|
122
|
+
export { BillingSubscriptionGetTest, BillingUsageSummaryTest, ProjectGetTest, ProjectListTest };
|
|
123
|
+
//# sourceMappingURL=operations.test-spec.js.map
|