rapida-partner 1.18.0 → 1.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/package.json +1 -1
  2. package/rapidaObject.json +1 -1
  3. package/src/constants/secrets/database.ts +1 -0
  4. package/src/constants/secrets/others.ts +3 -0
  5. package/src/constants/secrets/storage.ts +1 -0
  6. package/src/examples/components/charts/movieGenre.chart.ts +34 -0
  7. package/src/examples/components/forms/character.form.ts +4 -4
  8. package/src/examples/components/forms/company.form.ts +458 -0
  9. package/src/examples/components/forms/movie.form.ts +21 -7
  10. package/src/examples/components/forms/movieEpisode.form.ts +47 -22
  11. package/src/examples/components/forms/movieGenre.form.ts +2 -2
  12. package/src/examples/components/forms/person.form.ts +565 -0
  13. package/src/examples/components/lists/actor.list.ts +17 -0
  14. package/src/examples/components/lists/character.list.ts +1 -1
  15. package/src/examples/components/lists/movie.list.ts +1 -1
  16. package/src/examples/components/lists/movieEpisode.list.ts +15 -11
  17. package/src/examples/components/lists/movieGenre.list.ts +2 -2
  18. package/src/examples/constants/options/countriesFromEarth.ts +2011 -0
  19. package/src/examples/constants/options/legalNature.ts +198 -0
  20. package/src/examples/modules/actor.ts +1 -1
  21. package/src/examples/modules/character.ts +1 -1
  22. package/src/examples/modules/movie.ts +3 -3
  23. package/src/examples/projects/movieBackoffice.ts +22 -2
  24. package/src/interfaces/data-chart.interface.ts +15 -12
  25. package/src/interfaces/e2e.interface.ts +4 -0
  26. package/src/interfaces/form.interface.ts +0 -2
  27. package/src/interfaces/project.interface.ts +58 -14
  28. package/src/schemas/business-rules.ref.json +175 -4
  29. package/src/schemas/component-one-of.ref.json +25 -10
  30. package/src/schemas/data-chart.ref.json +146 -42
  31. package/src/schemas/e2e.ref.json +21 -0
  32. package/src/schemas/module.ref.json +40 -14
  33. package/src/schemas/project.schema.json +34 -11
  34. package/src/interfaces/layout-dashboard.interface.ts +0 -52
  35. package/src/schemas/bdd-and-e2e-narratives.ref.json +0 -47
  36. package/src/schemas/bdd-and-e2e.json +0 -33
  37. package/src/schemas/dashboard.ref.json +0 -111
@@ -2,14 +2,29 @@
2
2
  "$id": "component-one-of.ref.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "oneOf": [
5
- { "$ref": "form.ref.json" },
6
- { "$ref": "list.ref.json" },
7
- { "$ref": "data-table.ref.json" },
8
- { "$ref": "data-card.ref.json" },
9
- { "$ref": "data-grid.ref.json" },
10
- { "$ref": "data-detail.ref.json" },
11
- { "$ref": "data-chart.ref.json" },
12
- { "$ref": "dashboard.ref.json" },
13
- { "$ref": "panel.ref.json" }
5
+ {
6
+ "$ref": "form.ref.json"
7
+ },
8
+ {
9
+ "$ref": "list.ref.json"
10
+ },
11
+ {
12
+ "$ref": "data-table.ref.json"
13
+ },
14
+ {
15
+ "$ref": "data-card.ref.json"
16
+ },
17
+ {
18
+ "$ref": "data-grid.ref.json"
19
+ },
20
+ {
21
+ "$ref": "data-detail.ref.json"
22
+ },
23
+ {
24
+ "$ref": "data-chart.ref.json"
25
+ },
26
+ {
27
+ "$ref": "panel.ref.json"
28
+ }
14
29
  ]
15
- }
30
+ }
@@ -3,17 +3,34 @@
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "type": "object",
5
5
  "properties": {
6
- "componentType": { "const": "dataChart" },
7
- "id": { "type": "string" },
8
- "title": { "type": "string" },
9
- "icon": { "type": "string" },
6
+ "componentType": {
7
+ "const": "dataChart"
8
+ },
9
+ "id": {
10
+ "type": "string"
11
+ },
12
+ "title": {
13
+ "type": "string"
14
+ },
15
+ "icon": {
16
+ "type": "string"
17
+ },
10
18
  "guards": {
11
19
  "type": "string",
12
- "enum": ["isAuthenticated", "isAuthorized"]
20
+ "enum": [
21
+ "isAuthenticated",
22
+ "isAuthorized"
23
+ ]
24
+ },
25
+ "businessRules": {
26
+ "$ref": "business-rules.ref.json"
27
+ },
28
+ "userStory": {
29
+ "type": "string"
30
+ },
31
+ "dataSource": {
32
+ "$ref": "form-common-api-request.ref.json"
13
33
  },
14
- "businessRules": { "$ref": "business-rules.ref.json" },
15
- "userStory": { "type": "string" },
16
- "dataSource": { "$ref": "form-common-api-request.ref.json" },
17
34
  "chartType": {
18
35
  "type": "string",
19
36
  "enum": [
@@ -31,9 +48,15 @@
31
48
  "dimensions": {
32
49
  "type": "object",
33
50
  "properties": {
34
- "width": { "type": "string" },
35
- "height": { "type": "string" },
36
- "aspectRatio": { "type": "number" }
51
+ "width": {
52
+ "type": "string"
53
+ },
54
+ "height": {
55
+ "type": "string"
56
+ },
57
+ "aspectRatio": {
58
+ "type": "number"
59
+ }
37
60
  }
38
61
  },
39
62
  "data": {
@@ -42,79 +65,140 @@
42
65
  "labels": {
43
66
  "type": "object",
44
67
  "properties": {
45
- "property": { "type": "string" },
46
- "formatter": { "type": "string" }
68
+ "property": {
69
+ "type": "string"
70
+ },
71
+ "formatter": {
72
+ "type": "object",
73
+ "properties": {
74
+ "code": {
75
+ "type": "string"
76
+ },
77
+ "regex": {
78
+ "type": "string"
79
+ }
80
+ }
81
+ }
47
82
  },
48
- "required": ["property"]
83
+ "required": [
84
+ "property"
85
+ ]
49
86
  },
50
87
  "datasets": {
51
88
  "type": "array",
52
89
  "items": {
53
90
  "type": "object",
54
91
  "properties": {
55
- "property": { "type": "string" },
56
- "label": { "type": "string" },
92
+ "property": {
93
+ "type": "string"
94
+ },
95
+ "label": {
96
+ "type": "string"
97
+ },
57
98
  "backgroundColor": {
58
99
  "oneOf": [
59
- { "type": "string" },
100
+ {
101
+ "type": "string"
102
+ },
60
103
  {
61
104
  "type": "array",
62
- "items": { "type": "string" }
105
+ "items": {
106
+ "type": "string"
107
+ }
63
108
  }
64
109
  ]
65
110
  },
66
111
  "borderColor": {
67
112
  "oneOf": [
68
- { "type": "string" },
113
+ {
114
+ "type": "string"
115
+ },
69
116
  {
70
117
  "type": "array",
71
- "items": { "type": "string" }
118
+ "items": {
119
+ "type": "string"
120
+ }
72
121
  }
73
122
  ]
74
123
  },
75
- "borderWidth": { "type": "number" },
76
- "fill": { "type": "boolean" },
77
- "tension": { "type": "number" },
124
+ "borderWidth": {
125
+ "type": "number"
126
+ },
127
+ "fill": {
128
+ "type": "boolean"
129
+ },
130
+ "tension": {
131
+ "type": "number"
132
+ },
78
133
  "aggregator": {
79
134
  "type": "string",
80
- "enum": ["sum", "avg", "min", "max", "count"]
135
+ "enum": [
136
+ "sum",
137
+ "avg",
138
+ "min",
139
+ "max",
140
+ "count"
141
+ ]
81
142
  }
82
143
  },
83
- "required": ["property", "label"]
144
+ "required": [
145
+ "property",
146
+ "label"
147
+ ]
84
148
  }
85
149
  }
86
150
  },
87
- "required": ["labels", "datasets"]
151
+ "required": [
152
+ "labels",
153
+ "datasets"
154
+ ]
88
155
  },
89
156
  "options": {
90
157
  "type": "object",
91
158
  "properties": {
92
- "responsive": { "type": "boolean" },
93
- "maintainAspectRatio": { "type": "boolean" },
159
+ "responsive": {
160
+ "type": "boolean"
161
+ },
162
+ "maintainAspectRatio": {
163
+ "type": "boolean"
164
+ },
94
165
  "plugins": {
95
166
  "type": "object",
96
167
  "properties": {
97
168
  "title": {
98
169
  "type": "object",
99
170
  "properties": {
100
- "display": { "type": "boolean" },
101
- "text": { "type": "string" }
171
+ "display": {
172
+ "type": "boolean"
173
+ },
174
+ "text": {
175
+ "type": "string"
176
+ }
102
177
  }
103
178
  },
104
179
  "legend": {
105
180
  "type": "object",
106
181
  "properties": {
107
- "display": { "type": "boolean" },
182
+ "display": {
183
+ "type": "boolean"
184
+ },
108
185
  "position": {
109
186
  "type": "string",
110
- "enum": ["top", "bottom", "left", "right"]
187
+ "enum": [
188
+ "top",
189
+ "bottom",
190
+ "left",
191
+ "right"
192
+ ]
111
193
  }
112
194
  }
113
195
  },
114
196
  "tooltip": {
115
197
  "type": "object",
116
198
  "properties": {
117
- "enabled": { "type": "boolean" }
199
+ "enabled": {
200
+ "type": "boolean"
201
+ }
118
202
  }
119
203
  }
120
204
  }
@@ -128,14 +212,20 @@
128
212
  "title": {
129
213
  "type": "object",
130
214
  "properties": {
131
- "display": { "type": "boolean" },
132
- "text": { "type": "string" }
215
+ "display": {
216
+ "type": "boolean"
217
+ },
218
+ "text": {
219
+ "type": "string"
220
+ }
133
221
  }
134
222
  },
135
223
  "grid": {
136
224
  "type": "object",
137
225
  "properties": {
138
- "display": { "type": "boolean" }
226
+ "display": {
227
+ "type": "boolean"
228
+ }
139
229
  }
140
230
  }
141
231
  }
@@ -146,17 +236,25 @@
146
236
  "title": {
147
237
  "type": "object",
148
238
  "properties": {
149
- "display": { "type": "boolean" },
150
- "text": { "type": "string" }
239
+ "display": {
240
+ "type": "boolean"
241
+ },
242
+ "text": {
243
+ "type": "string"
244
+ }
151
245
  }
152
246
  },
153
247
  "grid": {
154
248
  "type": "object",
155
249
  "properties": {
156
- "display": { "type": "boolean" }
250
+ "display": {
251
+ "type": "boolean"
252
+ }
157
253
  }
158
254
  },
159
- "beginAtZero": { "type": "boolean" }
255
+ "beginAtZero": {
256
+ "type": "boolean"
257
+ }
160
258
  }
161
259
  }
162
260
  }
@@ -164,5 +262,11 @@
164
262
  }
165
263
  }
166
264
  },
167
- "required": ["componentType", "id", "dataSource", "chartType", "data"]
168
- }
265
+ "required": [
266
+ "componentType",
267
+ "id",
268
+ "dataSource",
269
+ "chartType",
270
+ "data"
271
+ ]
272
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "$id": "e2e.ref.json",
3
+ "type": "object",
4
+ "properties": {
5
+ "framework": {
6
+ "type": "string",
7
+ "enum": [
8
+ "cypress",
9
+ "playwright",
10
+ "webdriverio"
11
+ ]
12
+ },
13
+ "moduleId": {
14
+ "type": "string"
15
+ }
16
+ },
17
+ "required": [
18
+ "framework",
19
+ "moduleId"
20
+ ]
21
+ }
@@ -5,22 +5,43 @@
5
5
  "items": {
6
6
  "type": "object",
7
7
  "properties": {
8
- "id": { "type": "string" },
9
- "title": { "type": "string" },
10
- "icon": { "type": "string" },
8
+ "id": {
9
+ "type": "string"
10
+ },
11
+ "title": {
12
+ "type": "string"
13
+ },
14
+ "icon": {
15
+ "type": "string"
16
+ },
11
17
  "components": {
12
18
  "type": "array",
13
19
  "items": {
14
20
  "oneOf": [
15
- { "$ref": "form.ref.json" },
16
- { "$ref": "list.ref.json" },
17
- { "$ref": "data-table.ref.json" },
18
- { "$ref": "data-card.ref.json" },
19
- { "$ref": "data-grid.ref.json" },
20
- { "$ref": "data-detail.ref.json" },
21
- { "$ref": "data-chart.ref.json" },
22
- { "$ref": "dashboard.ref.json" },
23
- { "$ref": "panel.ref.json" }
21
+ {
22
+ "$ref": "form.ref.json"
23
+ },
24
+ {
25
+ "$ref": "list.ref.json"
26
+ },
27
+ {
28
+ "$ref": "data-table.ref.json"
29
+ },
30
+ {
31
+ "$ref": "data-card.ref.json"
32
+ },
33
+ {
34
+ "$ref": "data-grid.ref.json"
35
+ },
36
+ {
37
+ "$ref": "data-detail.ref.json"
38
+ },
39
+ {
40
+ "$ref": "data-chart.ref.json"
41
+ },
42
+ {
43
+ "$ref": "panel.ref.json"
44
+ }
24
45
  ]
25
46
  }
26
47
  },
@@ -34,6 +55,11 @@
34
55
  }
35
56
  }
36
57
  },
37
- "required": ["id", "title", "icon", "components"]
58
+ "required": [
59
+ "id",
60
+ "title",
61
+ "icon",
62
+ "components"
63
+ ]
38
64
  }
39
- }
65
+ }
@@ -12,17 +12,37 @@
12
12
  "description": {
13
13
  "type": "string"
14
14
  },
15
- "flow": {
15
+ "skeleton": {
16
16
  "type": "string",
17
- "enum": [
18
- "backofficeByInvitationWithoutPermissions",
19
- "backofficeByInvitationAndPermissionsByComponent",
20
- "backofficeOpenedWithoutPermissions",
21
- "backofficeOpenedAndPermissionsByComponent",
22
- "marketplace",
23
- "landingPage",
24
- "socialNetwork"
25
- ]
17
+ "enum": ["backoffice", "marketplace", "landingPage", "socialNetwork"]
18
+ },
19
+ "flows": {
20
+ "type": "object",
21
+ "properties": {
22
+ "authentication": {
23
+ "type": "boolean"
24
+ },
25
+ "permission": {
26
+ "type": "boolean"
27
+ },
28
+ "invitation": {
29
+ "type": "boolean"
30
+ },
31
+ "registration": {
32
+ "type": "boolean"
33
+ },
34
+ "profiles": {
35
+ "type": "object",
36
+ "properties": {
37
+ "personProfile": {
38
+ "$ref": "form.ref.json"
39
+ },
40
+ "companyProfile": {
41
+ "$ref": "form.ref.json"
42
+ }
43
+ }
44
+ }
45
+ }
26
46
  },
27
47
  "businessPlan": {
28
48
  "$ref": "business-plan.ref.json"
@@ -36,6 +56,9 @@
36
56
  "backend": {
37
57
  "$ref": "backend.ref.json"
38
58
  },
59
+ "e2e": {
60
+ "$ref": "e2e.ref.json"
61
+ },
39
62
  "modules": {
40
63
  "$ref": "module.ref.json"
41
64
  },
@@ -43,5 +66,5 @@
43
66
  "$ref": "form-flowchart.ref.json"
44
67
  }
45
68
  },
46
- "required": ["id", "title", "description"]
69
+ "required": ["id", "title", "description", "skeleton"]
47
70
  }
@@ -1,52 +0,0 @@
1
- import type { IApiRequest } from "./form-input.interface";
2
- import type { IBusinessRule } from "./project.interface";
3
-
4
- export interface IDashboard {
5
- componentType: "dashboard";
6
- id: string;
7
- title: string;
8
- icon?: string;
9
- guards?: "isAuthenticated" | "isAuthorized";
10
- businessRules?: IBusinessRule[];
11
- userStory?: string;
12
- layout: IDashboardSection[];
13
- }
14
-
15
- export interface IDashboardSection {
16
- id: string;
17
- title?: string;
18
- columns: number;
19
- widgets: IDashboardWidget[];
20
- }
21
-
22
- export interface IDashboardWidget {
23
- id: string;
24
- title: string;
25
- type: "stats" | "chart" | "table" | "list" | "component";
26
- width: 1 | 2 | 3 | 4 | 6 | 12; // Colunas que o widget ocupa em um grid de 12 colunas
27
- height?: "auto" | "small" | "medium" | "large";
28
- dataSource?: IApiRequest;
29
- refreshInterval?: number; // Em segundos
30
- component?: {
31
- type: "dataTable" | "dataGrid" | "dataCard" | "dataChart";
32
- config: any; // Referência para outra configuração de componente
33
- };
34
- statsConfig?: {
35
- property: string;
36
- format?: string;
37
- icon?: string;
38
- subtitle?: string;
39
- trend?: {
40
- property: string;
41
- upIsGood?: boolean;
42
- };
43
- };
44
- chartConfig?: {
45
- type: "line" | "bar" | "pie" | "doughnut" | "radar";
46
- properties: {
47
- x: string;
48
- y: string | string[];
49
- };
50
- options?: any; // Opções específicas do chart
51
- };
52
- }
@@ -1,47 +0,0 @@
1
- {
2
- "$id": "bdd-and-e2e-narratives.ref.json",
3
- "$schema": "http://json-schema.org/draft-07/schema#",
4
- "type": "array",
5
- "items": {
6
- "type": "object",
7
- "properties": {
8
- "title": {
9
- "type": "string"
10
- },
11
- "description": {
12
- "type": "string"
13
- },
14
- "businessRules": {
15
- "$ref": "business-rules.ref.json"
16
- },
17
- "scenarios": {
18
- "type": "array",
19
- "items": {
20
- "type": "object",
21
- "properties": {
22
- "title": {
23
- "type": "string"
24
- },
25
- "description": {
26
- "type": "string"
27
- },
28
- "businessRules": {
29
- "$ref": "business-rules.ref.json"
30
- }
31
- },
32
- "required": ["title", "description"]
33
- }
34
- },
35
- "e2e": {
36
- "type": "object",
37
- "properties": {
38
- "cypress": {
39
- "type": "string"
40
- }
41
- },
42
- "required": ["cypress"]
43
- }
44
- },
45
- "required": ["title", "description", "scenarios", "e2e"]
46
- }
47
- }
@@ -1,33 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "type": "object",
4
- "properties": {
5
- "bddTitle": {
6
- "type": "string"
7
- },
8
- "businessRules": {
9
- "$ref": "business-rules.ref.json"
10
- },
11
- "forms": {
12
- "type": "array",
13
- "elements": {
14
- "type": "object",
15
- "properties": {
16
- "forms": {
17
- "$ref": "form.ref.json",
18
- "narratives": {
19
- "$ref": "bdd-and-e2e-narratives.ref.json"
20
- }
21
- },
22
- "lists": {
23
- "$ref": "list.ref.json",
24
- "narratives": {
25
- "$ref": "bdd-and-e2e-narratives.ref.json"
26
- }
27
- }
28
- }
29
- }
30
- }
31
- },
32
- "required": ["bddTitle", "narratives"]
33
- }