rapida-partner 1.9.0 → 1.10.1

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 (27) hide show
  1. package/package.json +1 -1
  2. package/rapidaObject.json +882 -635
  3. package/src/examples/components/forms/character.form.ts +2 -2
  4. package/src/examples/components/forms/movie.form.ts +51 -27
  5. package/src/examples/components/forms/movieEpisode.form.ts +37 -38
  6. package/src/examples/components/forms/movieGenre.form.ts +18 -18
  7. package/src/examples/components/forms/test.form.ts +125 -0
  8. package/src/examples/components/lists/character.list.ts +23 -3
  9. package/src/examples/components/lists/movie.list.ts +34 -6
  10. package/src/examples/components/lists/movieEpisode.list.ts +31 -3
  11. package/src/examples/components/lists/movieGenre.list.ts +29 -3
  12. package/src/examples/modules/movie.ts +2 -3
  13. package/src/examples/projects/movieBackoffice.ts +2 -2
  14. package/src/interfaces/form-array.interface.ts +1 -1
  15. package/src/interfaces/form-flowchart.interface.ts +22 -0
  16. package/src/interfaces/form.interface.ts +6 -0
  17. package/src/interfaces/list.interface.ts +2 -0
  18. package/src/schemas/form-array.ref.json +2 -2
  19. package/src/schemas/form-flowchart-action-with-element.ref.json +29 -0
  20. package/src/schemas/form-flowchart-actor.ref.json +20 -0
  21. package/src/schemas/form-flowchart-element.ref.json +14 -0
  22. package/src/schemas/form-flowchart.ref.json +14 -0
  23. package/src/schemas/form.ref.json +3 -0
  24. package/src/schemas/list.ref.json +6 -0
  25. package/src/examples/components/lists/company.list.ts +0 -49
  26. package/src/examples/components/lists/customer.list.ts +0 -50
  27. package/src/examples/components/lists/person.list.ts +0 -50
package/rapidaObject.json CHANGED
@@ -1,726 +1,973 @@
1
- {
2
- "id": "movieBackoffice",
3
- "title": "Movie Backoffice",
4
- "description": "Sistema de gerenciamento para filmes e personagens.",
5
- "flow": "permeson",
6
- "businessPlan": {
7
- "businessValue": "Gerenciar e otimizar as operações do Movie.",
8
- "targetMarket": "Empresas que utilizam o Movie para gerenciar sugestões e feedbacks.",
9
- "benchmarkings": "Análise de sistemas de gerenciamento de feedbacks.",
10
- "legalIssues": "Conformidade com leis de proteção de dados.",
11
- "ethicalIssues": "Garantir a privacidade dos usuários.",
12
- "afterSales": "Suporte contínuo e atualizações regulares.",
13
- "monetization": "Assinaturas mensais para acesso ao sistema."
1
+ {
2
+ "id": "movieBackoffice",
3
+ "title": "Movie Backoffice",
4
+ "description": "Sistema de gerenciamento para filmes e personagens.",
5
+ "flow": "backofficeOpenedWithoutPermissions",
6
+ "businessPlan": {
7
+ "businessValue": "Gerenciar e otimizar as operações do Movie.",
8
+ "targetMarket": "Empresas que utilizam o Movie para gerenciar sugestões e feedbacks.",
9
+ "benchmarkings": "Análise de sistemas de gerenciamento de feedbacks.",
10
+ "legalIssues": "Conformidade com leis de proteção de dados.",
11
+ "ethicalIssues": "Garantir a privacidade dos usuários.",
12
+ "afterSales": "Suporte contínuo e atualizações regulares.",
13
+ "monetization": "Assinaturas mensais para acesso ao sistema."
14
+ },
15
+ "frontend": { "framework": "react", "uiKit": "flowbite" },
16
+ "backend": {
17
+ "framework": "nest",
18
+ "jwtSecret": "Kunl4t3kw1llN3v3rD13M0th3rFudg3r",
19
+ "database": {
20
+ "provider": "mongodb",
21
+ "connectionString": "mongodb+srv://kunlatek:Kunl4t3kw1llN3v3rD132025@cluster0.b0pfr.mongodb.net/movie-v1",
22
+ "credentials": {
23
+ "databaseName": "movie-v1",
24
+ "username": "kunlatek",
25
+ "password": "Kunl4t3kw1llN3v3rD132025",
26
+ "host": "cluster0.b0pfr.mongodb.net"
27
+ }
14
28
  },
15
- "frontend": { "framework": "svelte", "uiKit": "flowbite" },
16
- "backend": {
17
- "framework": "nest",
18
- "jwtSecret": "Kunl4t3kw1llN3v3rD13",
19
- "database": {
20
- "provider": "mongodb",
21
- "connectionString": "mongodb+srv://kunlatek:Kunlatek751@cluster0.b0pfr.mongodb.net/movie-v1",
22
- "credentials": {
23
- "databaseName": "movie-v1",
24
- "username": "kunlatek",
25
- "password": "Kunlatek751",
26
- "host": "cluster0.b0pfr.mongodb.net"
27
- }
28
- },
29
- "storage": {
30
- "provider": "gcs",
31
- "credentials": {
32
- "clientEmail": "rapida-personal@rapida-personal-projects.iam.gserviceaccount.com",
33
- "privateKey": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDCDEQRUfKKxYUj\nVorX+aiEHhPRrrcNHVw40qq517wP7IgIp2UlA5uf0rV2cdn1njA9RMQxp6l7Qt+0\nBZg1JZM8l9Uv1SckRlkKST4k2B3MDOEl1riAPxIE/jBCUT9l2DCbir0Nu+CqGhGD\nUXOMpF0XWYL9GIBRo8Paf//yU0b86VBDfQGgnFkMKFq3bVDkPd8hQTBgTFT5F1Rh\nDcoUpAp/n3SYxkAK1V7Je+fnChF1DQPj8Nd5CLm4DsCM1B+HtaegsaE1ulXwhi1J\nlIFFGv49g0f2qOs3hytTPt0d8UpxFd9/Oq0tmcjuzK4bYzJdVZZPf+4xflHz+6R8\n2o7grTeDAgMBAAECggEABHdsz6s/tnMCdARHcN41w0i/8wke/IXK/CHZPSrakNFE\ndlKIEPiKyfx7Ic1QE4e/G4HsNCpkS8qHxKiGTt7dCz2BcjbpTjvyS7rQ298/nFVF\nj23oVEdfXk8NhFFDcNAvmjzwyhKjgrbT5V5oFvonjGSKj9HTDk4DMZHVrdm93g9k\nZ9XJBVeLh14/rkZLMDZ9DVjUMiQ6xElMH3IQD4MwEcul9eqM8bs2APgZlzzfO76m\nAuq20l4JqOcJJl8wzC7z12eNDNJrQNh2sHsT9zV5PabfNoQhnU6fDvKr0PG0PGRR\nS5PTDeiMY47rJVPgwxthSke3abtdgA9SNie8OqZl6QKBgQD+yFT+ndFYKvHg2WNi\ns0jK0QqFQB84LQtOX2YhQ0137mtSv0z7wO90e28dfUqsjax4DxPMp+AW0cC3SBEv\n2T8/rJrgzGucPt4Jzml5HYl2NgCkNAtHIJ1vtXJdX5d3WmYhH7cUTPmV6nMS8OlF\nheSyfudCiOo89phQf0pI6lhQKwKBgQDC+aOU2cxMVA5VH0txX0G9tPQjBvzY09ev\nVLGrxlmdAcQVXYCWdoESEfTv3E4JPklAz5B2/XnALxM5ewJgjoP6buOCJrQcgJNC\nSsG9Ll3zF4c+opFmaYTzcAY9HWHa4Pc+GAxFrrcPGzVBLjSrl7FPdykkPiBNxNJa\nnOzzrL4yCQKBgQC7b/pHjycx6/YiawuY0zjcLMnGmhPdqhXFRJ3IHtFhR/+g0qf6\nFkiTszNdyI0lQNz/PmhciaxsXUegDt7GCtdjKsKOWxVXz1BeeoJR3g8A7l2ub7NU\nUoRAaIaIdwjhf5nfCIwR3UdIqUCbUKzsvsIvJvlPk5Zv3yLTJbIqzmzGHQKBgBiQ\nnUSGwE+pk3i0DaxGBSFiqBO1sKuc3SLQ9+WdgvLeIxdSBX5vhcmCC6sgxZAykcYh\noKDtRKarB7AJSH5j1kr6J53hRHYG2QbUJl6wddPH1hlVIB6YEtEc/xw6FHcgOuZO\n31T0M0oq8mW47Zfk78kESWGwlh9WOe6CsPPugrQJAoGBAP3o8DqH1Pb7vlowsz78\n8fsCuydEJgsPSwHHqBveeUHBQLGSiGIIKRXWR1a13mWXQTqQkROZCwvVCMX6FHZZ\nKv3rzgsTkaaoqM0RVLcQSSDoyu2yP/JJv+VYsvMf2S3dUkDAeYDZFizPeFF42t92\n+MSId41OkBvJ/JvqsBWlWFYK\n-----END PRIVATE KEY-----\n",
34
- "projectId": "rapida-personal-projects"
35
- },
36
- "publicBucketName": "rapida-public-files",
37
- "privateBucketName": "rapida-private-files"
38
- },
39
- "logging": {
40
- "discordWebhookUrl": "https://discord.com/api/webhooks/1370095507959054429/Ay8pIM-sinbjsLMAAWGrRDFT-oyBD3xu7yB2Ke0Bx6RxpKN882taB4_tkD2xsdk8MirZ"
29
+ "storage": {
30
+ "provider": "gcs",
31
+ "credentials": {
32
+ "clientEmail": "rapida-personal@rapida-personal-projects.iam.gserviceaccount.com",
33
+ "privateKey": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDCDEQRUfKKxYUj\nVorX+aiEHhPRrrcNHVw40qq517wP7IgIp2UlA5uf0rV2cdn1njA9RMQxp6l7Qt+0\nBZg1JZM8l9Uv1SckRlkKST4k2B3MDOEl1riAPxIE/jBCUT9l2DCbir0Nu+CqGhGD\nUXOMpF0XWYL9GIBRo8Paf//yU0b86VBDfQGgnFkMKFq3bVDkPd8hQTBgTFT5F1Rh\nDcoUpAp/n3SYxkAK1V7Je+fnChF1DQPj8Nd5CLm4DsCM1B+HtaegsaE1ulXwhi1J\nlIFFGv49g0f2qOs3hytTPt0d8UpxFd9/Oq0tmcjuzK4bYzJdVZZPf+4xflHz+6R8\n2o7grTeDAgMBAAECggEABHdsz6s/tnMCdARHcN41w0i/8wke/IXK/CHZPSrakNFE\ndlKIEPiKyfx7Ic1QE4e/G4HsNCpkS8qHxKiGTt7dCz2BcjbpTjvyS7rQ298/nFVF\nj23oVEdfXk8NhFFDcNAvmjzwyhKjgrbT5V5oFvonjGSKj9HTDk4DMZHVrdm93g9k\nZ9XJBVeLh14/rkZLMDZ9DVjUMiQ6xElMH3IQD4MwEcul9eqM8bs2APgZlzzfO76m\nAuq20l4JqOcJJl8wzC7z12eNDNJrQNh2sHsT9zV5PabfNoQhnU6fDvKr0PG0PGRR\nS5PTDeiMY47rJVPgwxthSke3abtdgA9SNie8OqZl6QKBgQD+yFT+ndFYKvHg2WNi\ns0jK0QqFQB84LQtOX2YhQ0137mtSv0z7wO90e28dfUqsjax4DxPMp+AW0cC3SBEv\n2T8/rJrgzGucPt4Jzml5HYl2NgCkNAtHIJ1vtXJdX5d3WmYhH7cUTPmV6nMS8OlF\nheSyfudCiOo89phQf0pI6lhQKwKBgQDC+aOU2cxMVA5VH0txX0G9tPQjBvzY09ev\nVLGrxlmdAcQVXYCWdoESEfTv3E4JPklAz5B2/XnALxM5ewJgjoP6buOCJrQcgJNC\nSsG9Ll3zF4c+opFmaYTzcAY9HWHa4Pc+GAxFrrcPGzVBLjSrl7FPdykkPiBNxNJa\nnOzzrL4yCQKBgQC7b/pHjycx6/YiawuY0zjcLMnGmhPdqhXFRJ3IHtFhR/+g0qf6\nFkiTszNdyI0lQNz/PmhciaxsXUegDt7GCtdjKsKOWxVXz1BeeoJR3g8A7l2ub7NU\nUoRAaIaIdwjhf5nfCIwR3UdIqUCbUKzsvsIvJvlPk5Zv3yLTJbIqzmzGHQKBgBiQ\nnUSGwE+pk3i0DaxGBSFiqBO1sKuc3SLQ9+WdgvLeIxdSBX5vhcmCC6sgxZAykcYh\noKDtRKarB7AJSH5j1kr6J53hRHYG2QbUJl6wddPH1hlVIB6YEtEc/xw6FHcgOuZO\n31T0M0oq8mW47Zfk78kESWGwlh9WOe6CsPPugrQJAoGBAP3o8DqH1Pb7vlowsz78\n8fsCuydEJgsPSwHHqBveeUHBQLGSiGIIKRXWR1a13mWXQTqQkROZCwvVCMX6FHZZ\nKv3rzgsTkaaoqM0RVLcQSSDoyu2yP/JJv+VYsvMf2S3dUkDAeYDZFizPeFF42t92\n+MSId41OkBvJ/JvqsBWlWFYK\n-----END PRIVATE KEY-----\n",
34
+ "projectId": "rapida-personal-projects"
41
35
  },
42
- "email": {
43
- "smtpUser": "noreply.rapida@gmail.com",
44
- "smtpPass": "ekgwxlazvjjllfxf",
45
- "smtpFrom": "noreply@kunlatek.com"
46
- },
47
- "baseUrl": "http://localhost:5173"
36
+ "publicBucketName": "rapida-public-files",
37
+ "privateBucketName": "rapida-private-files"
48
38
  },
49
- "modules": [
50
- {
51
- "id": "movieModule",
52
- "title": "Episódio",
53
- "icon": "movie",
54
- "components": [
55
- {
56
- "title": "Gerenciar filme",
57
- "userStory": "Como um usuário autorizado, eu quero usar o formulário de gerenciamento de filmes para cadastrar e editar filmes, incluindo a foto, o nome, a descrição, a data de lançamento, a pontuação no IMDb e os gêneros associados. Quero também ter a opção de adicionar e gerenciar episódios, incluindo seus títulos, descrições, datas de lançamento e personagens relacionados. Isso me permite manter um registro completo e detalhado do conteúdo audiovisual no sistema.",
58
- "componentType": "form",
59
- "contracts": [
60
- {
61
- "id": "movies",
62
- "endpoint": "/movies",
63
- "actions": ["create", "update", "getById", "get", "delete"],
64
- "request": {
65
- "entity": "Movie",
66
- "description": "Represents a movie or TV series in the system.",
67
- "fields": [
68
- {
69
- "name": "_id",
70
- "dataType": "uniqueidentifier",
71
- "isRequired": true,
72
- "isPrimaryKey": true
73
- },
39
+ "logging": {
40
+ "discordWebhookUrl": "https://discord.com/api/webhooks/1370095507959054429/Ay8pIM-sinbjsLMAAWGrRDFT-oyBD3xu7yB2Ke0Bx6RxpKN882taB4_tkD2xsdk8MirZ"
41
+ },
42
+ "email": {
43
+ "smtpUser": "noreply.rapida@gmail.com",
44
+ "smtpPass": "ekgwxlazvjjllfxf",
45
+ "smtpFrom": "noreply@kunlatek.com"
46
+ },
47
+ "baseUrl": "http://localhost:5173"
48
+ },
49
+ "modules": [
50
+ {
51
+ "id": "movieModule",
52
+ "title": "Filme",
53
+ "icon": "movie",
54
+ "components": [
55
+ {
56
+ "title": "Gerenciar filme",
57
+ "userStory": "Como um usuário autorizado, eu quero usar o formulário de gerenciamento de filmes para cadastrar e editar filmes, incluindo a foto, o nome, a descrição, a data de lançamento, a pontuação no IMDb e os gêneros associados. Quero também ter a opção de adicionar e gerenciar episódios, incluindo seus títulos, descrições, datas de lançamento e personagens relacionados. Isso me permite manter um registro completo e detalhado do conteúdo audiovisual no sistema.",
58
+ "componentType": "form",
59
+ "id": "movieForm",
60
+ "guards": "isAuthorized",
61
+ "elements": [
62
+ {
63
+ "type": "tab",
64
+ "id": "movieTab",
65
+ "tabs": [
66
+ {
67
+ "id": "mainTab",
68
+ "title": "Principal",
69
+ "elements": [
74
70
  {
71
+ "label": "Foto",
72
+ "type": "file",
73
+ "dataType": "text",
75
74
  "name": "pictureFile",
76
- "dataType": "nvarchar",
77
- "isRequired": false
75
+ "storageConfig": {
76
+ "fileNameStrategy": "uuid",
77
+ "path": "movies",
78
+ "visibility": "public"
79
+ }
78
80
  },
79
81
  {
82
+ "type": "input",
83
+ "dataType": "text",
84
+ "label": "Nome",
80
85
  "name": "name",
81
- "dataType": "nvarchar",
82
86
  "isRequired": true
83
87
  },
84
88
  {
89
+ "type": "input",
90
+ "dataType": "wysiwyg",
91
+ "label": "Descrição",
85
92
  "name": "description",
86
- "dataType": "longtext",
87
93
  "isRequired": true
88
94
  },
89
95
  {
90
- "name": "releaseDate",
96
+ "type": "input",
91
97
  "dataType": "date",
98
+ "label": "Data de lançamento",
99
+ "name": "releaseDate",
92
100
  "isRequired": true
93
101
  },
94
102
  {
103
+ "type": "input",
95
104
  "name": "imdbRating",
96
- "dataType": "decimal",
105
+ "label": "Pontuação do IMDb",
106
+ "dataType": "number",
97
107
  "isRequired": true
98
108
  },
99
109
  {
110
+ "type": "autocomplete",
111
+ "dataType": "text",
112
+ "label": "Gêneros",
100
113
  "name": "movieGenres",
101
- "dataType": "uniqueidentifier",
102
- "isRequired": true,
103
- "foreignKey": {
104
- "entity": "MovieGenre",
105
- "connectionAttribute": "_id",
106
- "relationship": "many-to-many"
107
- }
114
+ "optionsApi": {
115
+ "endpoint": "/api/movies-genres",
116
+ "labelField": ["name"],
117
+ "valueField": "_id",
118
+ "paramsToFilter": ["name"],
119
+ "paramType": "query",
120
+ "relatedEntity": "MovieGenres"
121
+ },
122
+ "isMultiple": true,
123
+ "isRequired": true
108
124
  },
109
125
  {
126
+ "type": "input",
110
127
  "name": "link1",
111
- "dataType": "nvarchar",
128
+ "label": "Link 1",
129
+ "dataType": "text",
112
130
  "isRequired": true
113
131
  },
114
132
  {
133
+ "type": "input",
115
134
  "name": "link2",
116
- "dataType": "nvarchar",
117
- "isRequired": false
135
+ "label": "Link 2",
136
+ "dataType": "text"
118
137
  },
119
138
  {
139
+ "type": "input",
120
140
  "name": "link3",
121
- "dataType": "nvarchar",
122
- "isRequired": false
141
+ "label": "Link 3",
142
+ "dataType": "text"
123
143
  }
124
144
  ]
125
145
  }
146
+ ]
147
+ }
148
+ ],
149
+ "contracts": [
150
+ {
151
+ "id": "movies",
152
+ "endpoint": "/movies",
153
+ "actions": ["create", "update", "getById", "get", "delete"],
154
+ "request": {
155
+ "entity": "Movie",
156
+ "description": "Represents a movie or TV series in the system.",
157
+ "fields": [
158
+ {
159
+ "name": "id",
160
+ "dataType": "uniqueidentifier",
161
+ "isRequired": true,
162
+ "isPrimaryKey": true
163
+ },
164
+ {
165
+ "name": "pictureFile",
166
+ "dataType": "nvarchar",
167
+ "isRequired": false
168
+ },
169
+ {
170
+ "name": "name",
171
+ "dataType": "nvarchar",
172
+ "isRequired": true
173
+ },
174
+ {
175
+ "name": "description",
176
+ "dataType": "longtext",
177
+ "isRequired": true
178
+ },
179
+ {
180
+ "name": "releaseDate",
181
+ "dataType": "date",
182
+ "isRequired": true
183
+ },
184
+ {
185
+ "name": "imdbRating",
186
+ "dataType": "decimal",
187
+ "isRequired": true
188
+ },
189
+ {
190
+ "name": "movieGenres",
191
+ "dataType": "uniqueidentifier",
192
+ "isRequired": true,
193
+ "foreignKey": {
194
+ "entity": "MovieGenre",
195
+ "connectionAttribute": "_id",
196
+ "relationship": "many-to-many"
197
+ }
198
+ },
199
+ {
200
+ "name": "link1",
201
+ "dataType": "nvarchar",
202
+ "isRequired": true
203
+ },
204
+ {
205
+ "name": "link2",
206
+ "dataType": "nvarchar",
207
+ "isRequired": false
208
+ },
209
+ {
210
+ "name": "link3",
211
+ "dataType": "nvarchar",
212
+ "isRequired": false
213
+ }
214
+ ]
126
215
  }
127
- ],
128
- "id": "movieForm",
129
- "guards": "isAuthorized",
130
- "elements": [
216
+ }
217
+ ],
218
+ "flowChart": {
219
+ "actors": [
131
220
  {
132
- "type": "tab",
133
- "id": "movieTab",
134
- "tabs": [
135
- {
136
- "id": "mainTab",
137
- "title": "Principal",
138
- "elements": [
139
- {
140
- "label": "Foto",
141
- "type": "file",
142
- "dataType": "text",
143
- "name": "pictureFile",
144
- "storageConfig": {
145
- "fileNameStrategy": "uuid",
146
- "path": "movies",
147
- "visibility": "public"
148
- }
149
- },
150
- {
151
- "type": "input",
152
- "dataType": "text",
153
- "label": "Nome",
154
- "name": "name",
155
- "isRequired": true
156
- },
157
- {
158
- "type": "input",
159
- "dataType": "wysiwyg",
160
- "label": "Descrição",
161
- "name": "description",
162
- "isRequired": true
163
- },
164
- {
165
- "type": "input",
166
- "dataType": "date",
167
- "label": "Data de lançamento",
168
- "name": "releaseDate",
169
- "isRequired": true
170
- },
171
- {
172
- "type": "input",
173
- "name": "imdbRating",
174
- "label": "Pontuação do IMDb",
175
- "dataType": "number",
176
- "isRequired": true
177
- },
178
- {
179
- "type": "autocomplete",
180
- "dataType": "text",
181
- "label": "Gêneros",
182
- "name": "movieGenres",
183
- "optionsApi": {
184
- "endpoint": "/api/movies-genres",
185
- "labelField": ["name"],
186
- "valueField": "_id",
187
- "paramsToFilter": ["name"],
188
- "paramType": "query",
189
- "relatedEntity": "MovieGenres"
190
- },
191
- "isMultiple": true,
192
- "isRequired": true
193
- },
194
- {
195
- "type": "input",
196
- "name": "link1",
197
- "label": "Link 1",
198
- "dataType": "text",
199
- "isRequired": true
200
- },
201
- {
202
- "type": "input",
203
- "name": "link2",
204
- "label": "Link 2",
205
- "dataType": "text"
206
- },
207
- {
208
- "type": "input",
209
- "name": "link3",
210
- "label": "Link 3",
211
- "dataType": "text"
212
- }
213
- ]
214
- }
221
+ "name": "Usuário",
222
+ "actionsWithElements": [
223
+ { "verb": "create" },
224
+ { "verb": "update" },
225
+ { "verb": "get" },
226
+ { "verb": "getById" },
227
+ { "verb": "delete" }
215
228
  ]
216
229
  }
217
230
  ]
231
+ }
232
+ },
233
+ {
234
+ "componentType": "list",
235
+ "id": "movieList",
236
+ "title": "Lista de filmes",
237
+ "guards": ["isAuthorized"],
238
+ "dataSource": {
239
+ "endpoint": "/movies",
240
+ "paramType": "query",
241
+ "hasAuthentication": true
218
242
  },
219
- {
220
- "componentType": "list",
221
- "id": "movieList",
222
- "title": "Lista de filmes",
223
- "guards": ["isAuthorized"],
224
- "dataSource": {
225
- "endpoint": "/movies",
226
- "paramType": "query",
227
- "hasAuthentication": true
243
+ "properties": [
244
+ {
245
+ "property": "pictureFile",
246
+ "type": "image",
247
+ "label": "Cartaz",
248
+ "dataType": "nvarchar"
228
249
  },
229
- "properties": [
230
- { "property": "pictureFile", "type": "image", "label": "Cartaz" },
231
- { "property": "name", "type": "title", "label": "Nome" },
232
- {
233
- "property": "releaseDate",
234
- "type": "subtitle",
235
- "label": "Data de lançamento"
236
- },
237
- {
238
- "property": "movieGenres.name",
239
- "type": "subtitle",
240
- "label": "Gênero"
241
- },
242
- {
243
- "property": "description",
244
- "type": "description",
245
- "label": "Descrição",
246
- "isHtml": true
247
- }
248
- ],
249
- "callsToActionMenu": [
250
- {
251
- "label": "Editar",
252
- "icon": "pencil",
253
- "action": {
254
- "link": {
255
- "endpoint": "/movie-form",
256
- "propertiesAsQueryParam": ["_id"]
257
- }
250
+ {
251
+ "property": "name",
252
+ "type": "title",
253
+ "label": "Nome",
254
+ "dataType": "nvarchar"
255
+ },
256
+ {
257
+ "property": "releaseDate",
258
+ "type": "subtitle",
259
+ "label": "Data de lançamento",
260
+ "dataType": "datetime2"
261
+ },
262
+ {
263
+ "property": "movieGenres.name",
264
+ "type": "subtitle",
265
+ "label": "Gênero",
266
+ "dataType": "nvarchar"
267
+ },
268
+ {
269
+ "property": "description",
270
+ "type": "description",
271
+ "label": "Descrição",
272
+ "isHtml": true,
273
+ "dataType": "longtext"
274
+ }
275
+ ],
276
+ "callsToActionMenu": [
277
+ {
278
+ "label": "Editar",
279
+ "icon": "pencil",
280
+ "action": {
281
+ "link": {
282
+ "endpoint": "/movie-form",
283
+ "propertiesAsQueryParam": ["_id"]
258
284
  }
259
- },
260
- {
261
- "label": "Excluir",
262
- "icon": "delete",
263
- "action": {
264
- "link": { "endpoint": "/movie-list" },
265
- "request": {
266
- "endpoint": "/movies",
267
- "verb": "delete",
268
- "propertiesAsPathParam": ["_id"],
269
- "dialog": {
270
- "title": "Excluir conteúdo",
271
- "message": "Deseja realmente excluir esse conteúdo?"
272
- }
285
+ }
286
+ },
287
+ {
288
+ "label": "Excluir",
289
+ "icon": "delete",
290
+ "action": {
291
+ "link": { "endpoint": "/movie-list" },
292
+ "request": {
293
+ "endpoint": "/movies",
294
+ "verb": "delete",
295
+ "propertiesAsPathParam": ["_id"],
296
+ "dialog": {
297
+ "title": "Excluir conteúdo",
298
+ "message": "Deseja realmente excluir esse conteúdo?"
273
299
  }
274
300
  }
275
301
  }
276
- ]
277
- },
278
- {
279
- "title": "Gerenciar gênero de filme",
280
- "userStory": "Como um usuário autorizado, eu quero usar o formulário de gerenciamento de gênero de filme para criar e editar gêneros de filmes, fornecendo um nome e uma descrição para cada um. Isso me permite organizar e categorizar filmes de forma precisa no sistema.",
281
- "componentType": "form",
282
- "contracts": [
283
- {
284
- "id": "moviesGenres",
285
- "endpoint": "/movie-genres",
286
- "actions": ["create", "get", "getById", "update", "delete"],
287
- "request": {
288
- "entity": "moviesGenres",
289
- "description": "",
290
- "fields": [
291
- {
292
- "name": "name",
293
- "dataType": "text",
294
- "isRequired": true,
295
- "maxSize": 255
296
- },
297
- {
298
- "name": "description",
299
- "dataType": "text",
300
- "isRequired": true,
301
- "maxSize": 255
302
+ }
303
+ ],
304
+ "contracts": [
305
+ {
306
+ "id": "movies",
307
+ "endpoint": "/movies",
308
+ "actions": ["create", "update", "getById", "get", "delete"],
309
+ "request": {
310
+ "entity": "Movie",
311
+ "description": "Represents a movie or TV series in the system.",
312
+ "fields": [
313
+ {
314
+ "name": "id",
315
+ "dataType": "uniqueidentifier",
316
+ "isRequired": true,
317
+ "isPrimaryKey": true
318
+ },
319
+ {
320
+ "name": "pictureFile",
321
+ "dataType": "nvarchar",
322
+ "isRequired": false
323
+ },
324
+ {
325
+ "name": "name",
326
+ "dataType": "nvarchar",
327
+ "isRequired": true
328
+ },
329
+ {
330
+ "name": "description",
331
+ "dataType": "longtext",
332
+ "isRequired": true
333
+ },
334
+ {
335
+ "name": "releaseDate",
336
+ "dataType": "datetime2",
337
+ "isRequired": true
338
+ },
339
+ {
340
+ "name": "imdbRating",
341
+ "dataType": "float",
342
+ "isRequired": true
343
+ },
344
+ {
345
+ "name": "movieGenres",
346
+ "dataType": "uniqueidentifier",
347
+ "isRequired": true,
348
+ "foreignKey": {
349
+ "entity": "MovieGenre",
350
+ "connectionAttribute": "_id",
351
+ "relationship": "many-to-many"
302
352
  }
303
- ]
304
- }
353
+ },
354
+ {
355
+ "name": "link1",
356
+ "dataType": "nvarchar",
357
+ "isRequired": true
358
+ },
359
+ {
360
+ "name": "link2",
361
+ "dataType": "nvarchar",
362
+ "isRequired": false
363
+ },
364
+ {
365
+ "name": "link3",
366
+ "dataType": "nvarchar",
367
+ "isRequired": false
368
+ }
369
+ ]
305
370
  }
306
- ],
307
- "id": "movieGenreForm",
308
- "guards": "isAuthorized",
309
- "elements": [
310
- {
311
- "type": "input",
312
- "dataType": "text",
313
- "label": "Nome",
314
- "name": "name",
315
- "isRequired": true
316
- },
317
- {
318
- "type": "input",
319
- "dataType": "wysiwyg",
320
- "label": "Descrição",
321
- "name": "description",
322
- "isRequired": true
371
+ }
372
+ ]
373
+ },
374
+ {
375
+ "title": "Gerenciar gênero de filme",
376
+ "userStory": "Como um usuário autorizado, eu quero usar o formulário de gerenciamento de gênero de filme para criar e editar gêneros de filmes, fornecendo um nome e uma descrição para cada um. Isso me permite organizar e categorizar filmes de forma precisa no sistema.",
377
+ "componentType": "form",
378
+ "id": "movieGenreForm",
379
+ "guards": "isAuthorized",
380
+ "elements": [
381
+ {
382
+ "type": "input",
383
+ "dataType": "text",
384
+ "label": "Nome",
385
+ "name": "name",
386
+ "isRequired": true
387
+ },
388
+ {
389
+ "type": "input",
390
+ "dataType": "wysiwyg",
391
+ "label": "Descrição",
392
+ "name": "description",
393
+ "isRequired": true
394
+ }
395
+ ],
396
+ "contracts": [
397
+ {
398
+ "id": "moviesGenres",
399
+ "endpoint": "/movie-genres",
400
+ "actions": ["create", "get", "getById", "update", "delete"],
401
+ "request": {
402
+ "entity": "moviesGenres",
403
+ "description": "",
404
+ "fields": [
405
+ {
406
+ "name": "name",
407
+ "dataType": "text",
408
+ "isRequired": true,
409
+ "maxSize": 255
410
+ },
411
+ {
412
+ "name": "description",
413
+ "dataType": "text",
414
+ "isRequired": true,
415
+ "maxSize": 255
416
+ }
417
+ ]
323
418
  }
324
- ]
419
+ }
420
+ ]
421
+ },
422
+ {
423
+ "componentType": "list",
424
+ "id": "movieGenreList",
425
+ "title": "Lista de gêneros de filmes",
426
+ "guards": ["isAuthorized"],
427
+ "dataSource": {
428
+ "endpoint": "/movies-genres",
429
+ "paramType": "query",
430
+ "hasAuthentication": true
325
431
  },
326
- {
327
- "componentType": "list",
328
- "id": "movieGenreList",
329
- "title": "Lista de gêneros de filmes",
330
- "guards": ["isAuthorized"],
331
- "dataSource": {
332
- "endpoint": "/movies-genres",
333
- "paramType": "query",
334
- "hasAuthentication": true
432
+ "properties": [
433
+ {
434
+ "property": "name",
435
+ "type": "title",
436
+ "label": "Nome",
437
+ "dataType": "nvarchar"
335
438
  },
336
- "properties": [
337
- { "property": "name", "type": "title", "label": "Nome" },
338
- {
339
- "property": "description",
340
- "type": "description",
341
- "label": "Descrição"
342
- }
343
- ],
344
- "callsToActionMenu": [
345
- {
346
- "label": "Editar",
347
- "icon": "pencil",
348
- "action": {
349
- "link": {
350
- "endpoint": "/movie-genre-form",
351
- "propertiesAsQueryParam": ["_id"]
352
- }
353
- }
354
- },
355
- {
356
- "label": "Excluir",
357
- "icon": "delete",
358
- "action": {
359
- "link": { "endpoint": "/movie-genre-list" },
360
- "request": {
361
- "endpoint": "/movies-genres",
362
- "verb": "delete",
363
- "propertiesAsPathParam": ["_id"],
364
- "dialog": {
365
- "title": "Excluir conteúdo",
366
- "message": "Deseja realmente excluir esse conteúdo?"
367
- }
368
- }
439
+ {
440
+ "property": "description",
441
+ "type": "description",
442
+ "label": "Descrição",
443
+ "isHtml": true,
444
+ "dataType": "longtext"
445
+ }
446
+ ],
447
+ "callsToActionMenu": [
448
+ {
449
+ "label": "Editar",
450
+ "icon": "pencil",
451
+ "action": {
452
+ "link": {
453
+ "endpoint": "/movie-genre-form",
454
+ "propertiesAsQueryParam": ["_id"]
369
455
  }
370
456
  }
371
- ]
372
- },
373
- {
374
- "title": "Gerenciar episódio",
375
- "componentType": "form",
376
- "id": "movieEpisodeForm",
377
- "contracts": [
378
- {
379
- "id": "moviesEpisodes",
380
- "endpoint": "/movies-episodes",
381
- "actions": ["create", "get", "getById", "update", "delete"],
457
+ },
458
+ {
459
+ "label": "Excluir",
460
+ "icon": "delete",
461
+ "action": {
462
+ "link": { "endpoint": "/movie-genre-list" },
382
463
  "request": {
383
- "entity": "MovieEpisode",
384
- "description": "Represents an episode of a TV series or show.",
385
- "fields": [
386
- {
387
- "name": "_id",
388
- "dataType": "uniqueidentifier",
389
- "isRequired": true,
390
- "isPrimaryKey": true
391
- },
392
- {
393
- "name": "movieId",
394
- "dataType": "uniqueidentifier",
395
- "isRequired": true,
396
- "foreignKey": {
397
- "entity": "Movie",
398
- "connectionAttribute": "_id",
399
- "relationship": "one-to-many"
400
- }
401
- },
402
- {
403
- "name": "title",
404
- "dataType": "nvarchar",
405
- "isRequired": true
406
- },
407
- {
408
- "name": "description",
409
- "dataType": "longtext",
410
- "isRequired": true
411
- },
412
- {
413
- "name": "releaseDate",
414
- "dataType": "datetime2",
415
- "isRequired": true
416
- },
417
- {
418
- "name": "characters",
419
- "dataType": "uniqueidentifier",
420
- "isRequired": false,
421
- "foreignKey": {
422
- "entity": "Character",
423
- "connectionAttribute": "_id",
424
- "relationship": "many-to-many"
425
- }
426
- }
427
- ]
464
+ "endpoint": "/movies-genres",
465
+ "verb": "delete",
466
+ "propertiesAsPathParam": ["_id"],
467
+ "dialog": {
468
+ "title": "Excluir conteúdo",
469
+ "message": "Deseja realmente excluir esse conteúdo?"
470
+ }
428
471
  }
429
472
  }
430
- ],
431
- "elements": [
432
- {
433
- "type": "array",
434
- "id": "episodes",
435
- "name": "episodes",
436
- "title": "Episódio",
437
- "elements": [
473
+ }
474
+ ],
475
+ "contracts": [
476
+ {
477
+ "id": "moviesGenres",
478
+ "endpoint": "/movie-genres",
479
+ "actions": ["create", "get", "getById", "update", "delete"],
480
+ "request": {
481
+ "entity": "moviesGenres",
482
+ "description": "",
483
+ "fields": [
438
484
  {
439
- "type": "input",
485
+ "name": "name",
440
486
  "dataType": "text",
441
- "label": "Título do episódio",
442
- "name": "episodeTitle",
487
+ "isRequired": true,
488
+ "maxSize": 255
489
+ },
490
+ {
491
+ "name": "description",
492
+ "dataType": "text",
493
+ "isRequired": true,
494
+ "maxSize": 255
495
+ }
496
+ ]
497
+ }
498
+ }
499
+ ]
500
+ },
501
+ {
502
+ "title": "Gerenciar episódio",
503
+ "componentType": "form",
504
+ "id": "movieEpisodeForm",
505
+ "elements": [
506
+ {
507
+ "label": "Episódio",
508
+ "name": "episodes",
509
+ "type": "array",
510
+ "elements": [
511
+ {
512
+ "label": "Título do episódio",
513
+ "name": "episodeTitle",
514
+ "type": "input",
515
+ "dataType": "text",
516
+ "isRequired": true
517
+ },
518
+ {
519
+ "label": "Descrição do episódio",
520
+ "name": "episodeDescription",
521
+ "type": "input",
522
+ "dataType": "wysiwyg"
523
+ },
524
+ {
525
+ "label": "Data de lançamento do episódio",
526
+ "name": "episodeReleaseDate",
527
+ "type": "input",
528
+ "dataType": "date"
529
+ },
530
+ {
531
+ "name": "charactersId",
532
+ "label": "Personagens no episódio",
533
+ "type": "autocomplete",
534
+ "dataType": "text",
535
+ "optionsApi": {
536
+ "endpoint": "/characters",
537
+ "labelField": ["characterName"],
538
+ "valueField": "_id",
539
+ "paramsToFilter": ["characterName"],
540
+ "paramType": "query",
541
+ "relatedEntity": "Character"
542
+ }
543
+ }
544
+ ]
545
+ }
546
+ ],
547
+ "contracts": [
548
+ {
549
+ "id": "moviesEpisodes",
550
+ "endpoint": "/movies-episodes",
551
+ "actions": ["create", "get", "getById", "update", "delete"],
552
+ "request": {
553
+ "entity": "MovieEpisode",
554
+ "description": "Represents an episode of a TV series or show.",
555
+ "fields": [
556
+ {
557
+ "name": "_id",
558
+ "dataType": "uniqueidentifier",
559
+ "isRequired": true,
560
+ "isPrimaryKey": true
561
+ },
562
+ {
563
+ "name": "movieId",
564
+ "dataType": "uniqueidentifier",
565
+ "isRequired": true,
566
+ "foreignKey": {
567
+ "entity": "Movie",
568
+ "connectionAttribute": "_id",
569
+ "relationship": "one-to-many"
570
+ }
571
+ },
572
+ {
573
+ "name": "title",
574
+ "dataType": "nvarchar",
443
575
  "isRequired": true
444
576
  },
445
577
  {
446
- "type": "input",
447
- "dataType": "wysiwyg",
448
- "label": "Descrição do episódio",
449
- "name": "episodeDescription"
578
+ "name": "description",
579
+ "dataType": "longtext",
580
+ "isRequired": true
450
581
  },
451
582
  {
452
- "type": "input",
453
- "dataType": "date",
454
- "label": "Data de lançamento do episódio",
455
- "name": "episodeReleaseDate"
583
+ "name": "releaseDate",
584
+ "dataType": "datetime2",
585
+ "isRequired": true
456
586
  },
457
587
  {
458
- "type": "autocomplete",
459
- "dataType": "text",
460
- "name": "charactersId",
461
- "label": "Personagens no episódio",
462
- "optionsApi": {
463
- "endpoint": "/characters",
464
- "labelField": ["characterName"],
465
- "valueField": "_id",
466
- "paramsToFilter": ["characterName"],
467
- "paramType": "query",
468
- "relatedEntity": "Character"
588
+ "name": "characters",
589
+ "dataType": "uniqueidentifier",
590
+ "isRequired": false,
591
+ "foreignKey": {
592
+ "entity": "Character",
593
+ "connectionAttribute": "_id",
594
+ "relationship": "many-to-many"
469
595
  }
470
596
  }
471
597
  ]
472
598
  }
473
- ]
599
+ }
600
+ ]
601
+ },
602
+ {
603
+ "componentType": "list",
604
+ "id": "movieEpisodeList",
605
+ "title": "Lista de episódios de filmes",
606
+ "guards": ["isAuthorized"],
607
+ "dataSource": {
608
+ "endpoint": "/movies-episodes",
609
+ "paramType": "query",
610
+ "hasAuthentication": true
474
611
  },
475
- {
476
- "componentType": "list",
477
- "id": "movieEpisodeList",
478
- "title": "Lista de episódios de filmes",
479
- "guards": ["isAuthorized"],
480
- "dataSource": {
481
- "endpoint": "/movies-episodes",
482
- "paramType": "query",
483
- "hasAuthentication": true
612
+ "properties": [
613
+ {
614
+ "property": "episodeTitle",
615
+ "type": "title",
616
+ "label": "Título",
617
+ "dataType": "nvarchar"
484
618
  },
485
- "properties": [
486
- { "property": "episodeTitle", "type": "title", "label": "Título" },
487
- {
488
- "property": "episodeDescription",
489
- "type": "description",
490
- "label": "Descrição"
491
- }
492
- ],
493
- "callsToActionMenu": [
494
- {
495
- "label": "Editar",
496
- "icon": "pencil",
497
- "action": {
498
- "link": {
499
- "endpoint": "/movie-episode-form",
500
- "propertiesAsQueryParam": ["_id"]
501
- }
502
- }
503
- },
504
- {
505
- "label": "Excluir",
506
- "icon": "delete",
507
- "action": {
508
- "link": { "endpoint": "/movie-episode-list" },
509
- "request": {
510
- "endpoint": "/movies-episodes",
511
- "verb": "delete",
512
- "propertiesAsPathParam": ["_id"],
513
- "dialog": {
514
- "title": "Excluir conteúdo",
515
- "message": "Deseja realmente excluir esse conteúdo?"
516
- }
517
- }
619
+ {
620
+ "property": "episodeDescription",
621
+ "type": "description",
622
+ "label": "Descrição",
623
+ "isHtml": true,
624
+ "dataType": "longtext"
625
+ }
626
+ ],
627
+ "callsToActionMenu": [
628
+ {
629
+ "label": "Editar",
630
+ "icon": "pencil",
631
+ "action": {
632
+ "link": {
633
+ "endpoint": "/movie-episode-form",
634
+ "propertiesAsQueryParam": ["_id"]
518
635
  }
519
636
  }
520
- ]
521
- }
522
- ]
523
- },
524
- {
525
- "id": "characterModule",
526
- "title": "Personagem",
527
- "icon": "character",
528
- "components": [
529
- {
530
- "title": "Personagem",
531
- "userStory": "Como um usuário autorizado, quero usar o formulário de personagem para criar e editar personagens, fornecendo um nome, uma descrição, um tipo (como \"protagonista\" ou \"antagonista\") e um gênero para cada um. Isso me permite manter um registro detalhado e organizado dos personagens no sistema.",
532
- "componentType": "form",
533
- "id": "characterForm",
534
- "contracts": [
535
- {
536
- "id": "characters",
537
- "endpoint": "/characters",
538
- "actions": ["create", "get", "getById", "update", "delete"],
637
+ },
638
+ {
639
+ "label": "Excluir",
640
+ "icon": "delete",
641
+ "action": {
642
+ "link": { "endpoint": "/movie-episode-list" },
539
643
  "request": {
540
- "entity": "Character",
541
- "description": "Represents a character in a story or narrative.",
542
- "fields": [
543
- {
544
- "name": "_id",
545
- "dataType": "uniqueidentifier",
546
- "isRequired": true,
547
- "isPrimaryKey": true
548
- },
549
- {
550
- "name": "characterName",
551
- "dataType": "nvarchar",
552
- "isRequired": true
553
- },
554
- {
555
- "name": "characterImage",
556
- "dataType": "nvarchar",
557
- "isRequired": false
558
- },
559
- {
560
- "name": "characterDescription",
561
- "dataType": "longtext",
562
- "isRequired": false
563
- },
564
- {
565
- "name": "characterType",
566
- "dataType": "nvarchar",
567
- "enum": [
568
- "protagonist",
569
- "antagonist",
570
- "hero",
571
- "villain",
572
- "sidekick",
573
- "supporting"
574
- ],
575
- "isRequired": false
576
- },
577
- {
578
- "name": "characterGender",
579
- "dataType": "nvarchar",
580
- "enum": ["male", "female", "other"],
581
- "isRequired": false
582
- }
583
- ]
644
+ "endpoint": "/movies-episodes",
645
+ "verb": "delete",
646
+ "propertiesAsPathParam": ["_id"],
647
+ "dialog": {
648
+ "title": "Excluir conteúdo",
649
+ "message": "Deseja realmente excluir esse conteúdo?"
650
+ }
584
651
  }
585
652
  }
586
- ],
587
- "guards": "isAuthorized",
588
- "elements": [
589
- {
590
- "type": "input",
591
- "dataType": "text",
592
- "label": "Nome do personagem",
593
- "name": "characterName",
594
- "isRequired": true
595
- },
596
- {
597
- "label": "Foto do personagem",
598
- "type": "file",
599
- "dataType": "text",
600
- "name": "characterImage",
601
- "storageConfig": {
602
- "fileNameStrategy": "uuid",
603
- "path": "characters",
604
- "visibility": "public"
605
- }
606
- },
607
- {
608
- "type": "input",
609
- "dataType": "wysiwyg",
610
- "label": "Descrição do personagem",
611
- "name": "characterDescription"
612
- },
613
- {
614
- "type": "select",
615
- "label": "Tipo de personagem",
616
- "name": "characterType",
617
- "dataType": "text",
618
- "options": [
619
- { "value": "protagonist", "label": "Protagonista" },
620
- { "value": "antagonist", "label": "Antagonista" },
621
- { "value": "hero", "label": "Herói" },
622
- { "value": "villain", "label": "Vilão" },
623
- { "value": "sidekick", "label": "Ajudante" },
624
- { "value": "supporting", "label": "Secundário" }
653
+ }
654
+ ],
655
+ "contracts": [
656
+ {
657
+ "id": "moviesEpisodes",
658
+ "endpoint": "/movies-episodes",
659
+ "actions": ["create", "get", "getById", "update", "delete"],
660
+ "request": {
661
+ "entity": "MovieEpisode",
662
+ "description": "Represents an episode of a TV series or show.",
663
+ "fields": [
664
+ {
665
+ "name": "_id",
666
+ "dataType": "uniqueidentifier",
667
+ "isRequired": true,
668
+ "isPrimaryKey": true
669
+ },
670
+ {
671
+ "name": "movieId",
672
+ "dataType": "uniqueidentifier",
673
+ "isRequired": true,
674
+ "foreignKey": {
675
+ "entity": "Movie",
676
+ "connectionAttribute": "_id",
677
+ "relationship": "one-to-many"
678
+ }
679
+ },
680
+ {
681
+ "name": "title",
682
+ "dataType": "nvarchar",
683
+ "isRequired": true
684
+ },
685
+ {
686
+ "name": "description",
687
+ "dataType": "longtext",
688
+ "isRequired": true
689
+ },
690
+ {
691
+ "name": "releaseDate",
692
+ "dataType": "datetime2",
693
+ "isRequired": true
694
+ },
695
+ {
696
+ "name": "characters",
697
+ "dataType": "uniqueidentifier",
698
+ "isRequired": false,
699
+ "foreignKey": {
700
+ "entity": "Character",
701
+ "connectionAttribute": "_id",
702
+ "relationship": "many-to-many"
703
+ }
704
+ }
625
705
  ]
626
- },
627
- {
628
- "type": "select",
629
- "label": "Gênero do personagem",
630
- "name": "characterGender",
631
- "dataType": "text",
632
- "options": [
633
- { "value": "male", "label": "Masculino" },
634
- { "value": "female", "label": "Feminino" },
635
- { "value": "other", "label": "Outro" }
706
+ }
707
+ }
708
+ ]
709
+ }
710
+ ]
711
+ },
712
+ {
713
+ "id": "characterModule",
714
+ "title": "Personagem",
715
+ "icon": "character",
716
+ "components": [
717
+ {
718
+ "title": "Personagem",
719
+ "userStory": "Como um usuário autorizado, quero usar o formulário de personagem para criar e editar personagens, fornecendo um nome, uma descrição, um tipo (como \"protagonista\" ou \"antagonista\") e um gênero para cada um. Isso me permite manter um registro detalhado e organizado dos personagens no sistema.",
720
+ "componentType": "form",
721
+ "id": "characterForm",
722
+ "contracts": [
723
+ {
724
+ "id": "characters",
725
+ "endpoint": "/characters",
726
+ "actions": ["create", "get", "getById", "update", "delete"],
727
+ "request": {
728
+ "entity": "characters",
729
+ "description": "Represents a character in a story or narrative.",
730
+ "fields": [
731
+ {
732
+ "name": "id",
733
+ "dataType": "uniqueidentifier",
734
+ "isRequired": true,
735
+ "isPrimaryKey": true
736
+ },
737
+ {
738
+ "name": "characterName",
739
+ "dataType": "nvarchar",
740
+ "isRequired": true
741
+ },
742
+ {
743
+ "name": "characterImage",
744
+ "dataType": "nvarchar",
745
+ "isRequired": false
746
+ },
747
+ {
748
+ "name": "characterDescription",
749
+ "dataType": "longtext",
750
+ "isRequired": false
751
+ },
752
+ {
753
+ "name": "characterType",
754
+ "dataType": "nvarchar",
755
+ "enum": [
756
+ "protagonist",
757
+ "antagonist",
758
+ "hero",
759
+ "villain",
760
+ "sidekick",
761
+ "supporting"
762
+ ],
763
+ "isRequired": false
764
+ },
765
+ {
766
+ "name": "characterGender",
767
+ "dataType": "nvarchar",
768
+ "enum": ["male", "female", "other"],
769
+ "isRequired": false
770
+ }
636
771
  ]
637
772
  }
638
- ]
773
+ }
774
+ ],
775
+ "guards": "isAuthorized",
776
+ "elements": [
777
+ {
778
+ "type": "input",
779
+ "dataType": "text",
780
+ "label": "Nome do personagem",
781
+ "name": "characterName",
782
+ "isRequired": true
783
+ },
784
+ {
785
+ "label": "Foto do personagem",
786
+ "type": "file",
787
+ "dataType": "text",
788
+ "name": "characterImage",
789
+ "storageConfig": {
790
+ "fileNameStrategy": "uuid",
791
+ "path": "characters",
792
+ "visibility": "public"
793
+ }
794
+ },
795
+ {
796
+ "type": "input",
797
+ "dataType": "wysiwyg",
798
+ "label": "Descrição do personagem",
799
+ "name": "characterDescription"
800
+ },
801
+ {
802
+ "type": "select",
803
+ "label": "Tipo de personagem",
804
+ "name": "characterType",
805
+ "dataType": "text",
806
+ "options": [
807
+ { "value": "protagonist", "label": "Protagonista" },
808
+ { "value": "antagonist", "label": "Antagonista" },
809
+ { "value": "hero", "label": "Herói" },
810
+ { "value": "villain", "label": "Vilão" },
811
+ { "value": "sidekick", "label": "Ajudante" },
812
+ { "value": "supporting", "label": "Secundário" }
813
+ ]
814
+ },
815
+ {
816
+ "type": "select",
817
+ "label": "Gênero do personagem",
818
+ "name": "characterGender",
819
+ "dataType": "text",
820
+ "options": [
821
+ { "value": "male", "label": "Masculino" },
822
+ { "value": "female", "label": "Feminino" },
823
+ { "value": "other", "label": "Outro" }
824
+ ]
825
+ }
826
+ ]
827
+ },
828
+ {
829
+ "title": "Lista de personagens",
830
+ "componentType": "list",
831
+ "id": "characterList",
832
+ "guards": ["isAuthorized"],
833
+ "dataSource": {
834
+ "endpoint": "/characters",
835
+ "paramType": "query",
836
+ "hasAuthentication": true
639
837
  },
640
- {
641
- "title": "Lista de personagens",
642
- "componentType": "list",
643
- "id": "characterList",
644
- "guards": ["isAuthorized"],
645
- "dataSource": {
646
- "endpoint": "/characters",
647
- "paramType": "query",
648
- "hasAuthentication": true
838
+ "properties": [
839
+ {
840
+ "label": "Nome",
841
+ "property": "characterName",
842
+ "type": "title",
843
+ "dataType": "nvarchar"
649
844
  },
650
- "properties": [
651
- { "label": "Nome", "property": "characterName", "type": "title" },
652
- {
653
- "label": "Descrição",
654
- "property": "characterDescription",
655
- "type": "description",
656
- "isHtml": true
845
+ {
846
+ "label": "Descrição",
847
+ "property": "characterDescription",
848
+ "type": "description",
849
+ "isHtml": true,
850
+ "dataType": "longtext"
851
+ }
852
+ ],
853
+ "callsToActionMenu": [
854
+ {
855
+ "label": "Editar",
856
+ "icon": "pencil",
857
+ "action": {
858
+ "link": {
859
+ "endpoint": "/character-form",
860
+ "propertiesAsQueryParam": ["_id"]
861
+ }
657
862
  }
658
- ],
659
- "callsToActionMenu": [
660
- {
661
- "label": "Editar",
662
- "icon": "pencil",
663
- "action": {
664
- "link": {
665
- "endpoint": "/character-form",
666
- "propertiesAsQueryParam": ["_id"]
863
+ },
864
+ {
865
+ "label": "Excluir",
866
+ "icon": "delete",
867
+ "action": {
868
+ "link": { "endpoint": "/character-list" },
869
+ "request": {
870
+ "endpoint": "/characters",
871
+ "verb": "delete",
872
+ "propertiesAsPathParam": ["_id"],
873
+ "dialog": {
874
+ "title": "Excluir projeto",
875
+ "message": "Deseja realmente excluir essa projeto?"
667
876
  }
668
877
  }
669
- },
670
- {
671
- "label": "Excluir",
672
- "icon": "delete",
673
- "action": {
674
- "link": { "endpoint": "/character-list" },
675
- "request": {
676
- "endpoint": "/characters",
677
- "verb": "delete",
678
- "propertiesAsPathParam": ["_id"],
679
- "dialog": {
680
- "title": "Excluir projeto",
681
- "message": "Deseja realmente excluir essa projeto?"
682
- }
878
+ }
879
+ }
880
+ ],
881
+ "contracts": [
882
+ {
883
+ "id": "characters",
884
+ "endpoint": "/characters",
885
+ "actions": ["get", "getById"],
886
+ "request": {
887
+ "entity": "characters",
888
+ "description": "Represents a character in a story or narrative.",
889
+ "fields": [
890
+ {
891
+ "name": "id",
892
+ "dataType": "uniqueidentifier",
893
+ "isRequired": true,
894
+ "isPrimaryKey": true
895
+ },
896
+ {
897
+ "name": "characterName",
898
+ "dataType": "nvarchar",
899
+ "isRequired": true
900
+ },
901
+ {
902
+ "name": "characterImage",
903
+ "dataType": "nvarchar",
904
+ "isRequired": false
905
+ },
906
+ {
907
+ "name": "characterDescription",
908
+ "dataType": "longtext",
909
+ "isRequired": false
910
+ },
911
+ {
912
+ "name": "characterType",
913
+ "dataType": "nvarchar",
914
+ "enum": [
915
+ "protagonist",
916
+ "antagonist",
917
+ "hero",
918
+ "villain",
919
+ "sidekick",
920
+ "supporting"
921
+ ],
922
+ "isRequired": false
923
+ },
924
+ {
925
+ "name": "characterGender",
926
+ "dataType": "nvarchar",
927
+ "enum": ["male", "female", "other"],
928
+ "isRequired": false
683
929
  }
684
- }
930
+ ]
685
931
  }
686
- ]
687
- }
688
- ]
689
- }
690
- ],
691
- "styles": [
692
- {
693
- "themeName": "light",
694
- "main": {
695
- "headerHeight": "60px",
696
- "typography": { "fontFamily": "Arial, sans-serif", "fontSize": "16px" },
697
- "colors": {
698
- "primary": "#4F46E5",
699
- "primaryContrast": "#FFFFFF",
700
- "secondary": "#6B7280",
701
- "secondaryContrast": "#FFFFFF",
702
- "background": "#FFFFFF",
703
- "error": "#DC2626",
704
- "success": "#16A34A",
705
- "warning": "#D97706"
706
- },
707
- "shadows": { "boxShadow": "0 1px 3px rgba(0, 0, 0, 0.1)" },
708
- "borders": { "radius": "4px" },
709
- "components": {
710
- "input": {
711
- "text": "#111827",
712
- "background": "#F9FAFB",
713
- "border": "#D1D5DB",
714
- "borderRadius": "4px",
715
- "focusBorder": "#4F46E5",
716
- "placeholder": "#9CA3AF",
717
- "width": "248px"
718
932
  }
719
- },
720
- "spacing": "8px",
721
- "maxWidth": "1200px",
722
- "footerHeight": "60px"
933
+ ]
723
934
  }
935
+ ]
936
+ }
937
+ ],
938
+ "styles": [
939
+ {
940
+ "themeName": "light",
941
+ "main": {
942
+ "headerHeight": "60px",
943
+ "typography": { "fontFamily": "Arial, sans-serif", "fontSize": "16px" },
944
+ "colors": {
945
+ "primary": "#4F46E5",
946
+ "primaryContrast": "#FFFFFF",
947
+ "secondary": "#6B7280",
948
+ "secondaryContrast": "#FFFFFF",
949
+ "background": "#FFFFFF",
950
+ "error": "#DC2626",
951
+ "success": "#16A34A",
952
+ "warning": "#D97706"
953
+ },
954
+ "shadows": { "boxShadow": "0 1px 3px rgba(0, 0, 0, 0.1)" },
955
+ "borders": { "radius": "4px" },
956
+ "components": {
957
+ "input": {
958
+ "text": "#111827",
959
+ "background": "#F9FAFB",
960
+ "border": "#D1D5DB",
961
+ "borderRadius": "4px",
962
+ "focusBorder": "#4F46E5",
963
+ "placeholder": "#9CA3AF",
964
+ "width": "248px"
965
+ }
966
+ },
967
+ "spacing": "8px",
968
+ "maxWidth": "1200px",
969
+ "footerHeight": "60px"
724
970
  }
725
- ]
726
- }
971
+ }
972
+ ]
973
+ }