rapida-partner 1.0.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/README.md +85 -0
- package/index.ts +13 -0
- package/package.json +27 -0
- package/rapidaObject.json +3024 -0
- package/src/constants/options/agendaStatus.ts +3 -0
- package/src/constants/options/citiesFromBrazil.ts +27852 -0
- package/src/constants/options/countriesFromEarth.ts +1761 -0
- package/src/constants/options/currencies.ts +142 -0
- package/src/constants/options/eventJobs.ts +94 -0
- package/src/constants/options/events.ts +22 -0
- package/src/constants/options/hours.ts +26 -0
- package/src/constants/options/languages.ts +34 -0
- package/src/constants/options/statesFromBrazil.ts +29 -0
- package/src/controllers/ts_project_to_json_project.ts +17 -0
- package/src/controllers/validate-project-json-schema.ts +11 -0
- package/src/examples/components/forms/character.form.ts +92 -0
- package/src/examples/components/forms/company.form.ts +648 -0
- package/src/examples/components/forms/movie.form.ts +205 -0
- package/src/examples/components/forms/movieGenre.form.ts +43 -0
- package/src/examples/components/forms/person.form.ts +474 -0
- package/src/examples/components/lists/character.list.ts +47 -0
- package/src/examples/components/lists/company.list.ts +49 -0
- package/src/examples/components/lists/movie.list.ts +60 -0
- package/src/examples/components/lists/movieGenre.list.ts +51 -0
- package/src/examples/components/lists/person.list.ts +50 -0
- package/src/examples/modules/character.ts +13 -0
- package/src/examples/modules/company.ts +13 -0
- package/src/examples/modules/movie.ts +17 -0
- package/src/examples/modules/person.ts +13 -0
- package/src/examples/projects/movieBackoffice.ts +110 -0
- package/src/interfaces/backend-framework-structure.interface.ts +44 -0
- package/src/interfaces/data-card.interface.ts +102 -0
- package/src/interfaces/data-chart.interface.ts +84 -0
- package/src/interfaces/data-detail.interface.ts +123 -0
- package/src/interfaces/data-grid.interface.ts +48 -0
- package/src/interfaces/data-table.interface.ts +84 -0
- package/src/interfaces/form-array.interface.ts +14 -0
- package/src/interfaces/form-autocomplete.interface.ts +79 -0
- package/src/interfaces/form-button.interface.ts +34 -0
- package/src/interfaces/form-condition.interface.ts +26 -0
- package/src/interfaces/form-datepicker.interface.ts +18 -0
- package/src/interfaces/form-fieldset.interface.ts +13 -0
- package/src/interfaces/form-file.interface.ts +57 -0
- package/src/interfaces/form-input.interface.ts +69 -0
- package/src/interfaces/form-numeric.interface.ts +22 -0
- package/src/interfaces/form-pattern.interface.ts +16 -0
- package/src/interfaces/form-radiogroup.interface.ts +21 -0
- package/src/interfaces/form-select.interface.ts +60 -0
- package/src/interfaces/form-switch.interface.ts +15 -0
- package/src/interfaces/form-tab.interface.ts +17 -0
- package/src/interfaces/form.interface.ts +73 -0
- package/src/interfaces/frontend-framework-structure.interface.ts +39 -0
- package/src/interfaces/layout-dashboard.interface.ts +52 -0
- package/src/interfaces/layout-panel.interface.ts +45 -0
- package/src/interfaces/list.interface.ts +50 -0
- package/src/interfaces/project-backend.interface.ts +48 -0
- package/src/interfaces/project-style.interface.ts +129 -0
- package/src/interfaces/project.interface.ts +79 -0
- package/src/interfaces/yaml-template-skeleton.interface.ts +35 -0
- package/src/schemas/backend-framework-structure.schema.json +194 -0
- package/src/schemas/backend.ref.json +77 -0
- package/src/schemas/bdd-and-e2e-narratives.ref.json +57 -0
- package/src/schemas/bdd-and-e2e.json +36 -0
- package/src/schemas/business-plan.ref.json +25 -0
- package/src/schemas/business-rules.ref.json +34 -0
- package/src/schemas/component-one-of.ref.json +15 -0
- package/src/schemas/dashboard.ref.json +111 -0
- package/src/schemas/data-card.ref.json +245 -0
- package/src/schemas/data-chart.ref.json +168 -0
- package/src/schemas/data-detail.ref.json +297 -0
- package/src/schemas/data-grid.ref.json +101 -0
- package/src/schemas/data-table.ref.json +181 -0
- package/src/schemas/external-application.ref.json +97 -0
- package/src/schemas/form-array.ref.json +35 -0
- package/src/schemas/form-autocomplete-options-api.ref.json +53 -0
- package/src/schemas/form-autocomplete.ref.json +204 -0
- package/src/schemas/form-button.ref.json +88 -0
- package/src/schemas/form-common-api-request.ref.json +29 -0
- package/src/schemas/form-common-filters-from-other-form-fields.ref.json +22 -0
- package/src/schemas/form-common-form-fields-filled-by-api-response.ref.json +28 -0
- package/src/schemas/form-condition.ref.json +70 -0
- package/src/schemas/form-datepicker.ref.json +50 -0
- package/src/schemas/form-fieldset.ref.json +28 -0
- package/src/schemas/form-file.ref.json +115 -0
- package/src/schemas/form-input.ref.json +105 -0
- package/src/schemas/form-numeric.ref.json +60 -0
- package/src/schemas/form-one-of.ref.json +22 -0
- package/src/schemas/form-pattern.ref.json +42 -0
- package/src/schemas/form-radiogroup.ref.json +64 -0
- package/src/schemas/form-select.ref.json +123 -0
- package/src/schemas/form-switch.ref.json +39 -0
- package/src/schemas/form-tab.ref.json +50 -0
- package/src/schemas/form.ref.json +107 -0
- package/src/schemas/frontend-framework-structure.schema.json +178 -0
- package/src/schemas/frontend.ref.json +30 -0
- package/src/schemas/list.ref.json +196 -0
- package/src/schemas/module.ref.json +39 -0
- package/src/schemas/panel.ref.json +127 -0
- package/src/schemas/project.schema.json +39 -0
- package/src/schemas/todo.ref.json +10 -0
- package/src/utils/email.ts +56 -0
- package/src/utils/env.ts +9 -0
- package/src/utils/file.ts +139 -0
- package/src/utils/json.ts +100 -0
- package/src/utils/path.ts +51 -0
- package/src/utils/rapida-project.ts +17 -0
- package/tsconfig.json +27 -0
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import type { IForm } from "../../../interfaces/form.interface";
|
|
2
|
+
|
|
3
|
+
export const movieForm: IForm = {
|
|
4
|
+
title: "Gerenciar filme",
|
|
5
|
+
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.`,
|
|
6
|
+
componentType: "form",
|
|
7
|
+
contracts: [
|
|
8
|
+
{
|
|
9
|
+
endpoint: "/movies",
|
|
10
|
+
methods: [{ verb: "POST" }, { verb: "PUT" }, { verb: "GET" }, { verb: "DELETE" }],
|
|
11
|
+
request: {
|
|
12
|
+
body: [
|
|
13
|
+
{
|
|
14
|
+
name: "pictureFile",
|
|
15
|
+
dataType: "text",
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: "name",
|
|
19
|
+
dataType: "text",
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: "description",
|
|
23
|
+
dataType: "wysiwyg",
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: "releaseDate",
|
|
27
|
+
dataType: "date",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: "imdbRating",
|
|
31
|
+
dataType: "number",
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: "movieGenres",
|
|
35
|
+
dataType: "array",
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: "link1",
|
|
39
|
+
dataType: "text",
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: "link2",
|
|
43
|
+
dataType: "text",
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: "link3",
|
|
47
|
+
dataType: "text",
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: "episodes",
|
|
51
|
+
dataType: "array",
|
|
52
|
+
},
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
id: "movieForm",
|
|
58
|
+
guards: "isAuthorized",
|
|
59
|
+
elements: [
|
|
60
|
+
{
|
|
61
|
+
type: "tab",
|
|
62
|
+
id: "movieTab",
|
|
63
|
+
tabs: [
|
|
64
|
+
{
|
|
65
|
+
id: "mainTab",
|
|
66
|
+
title: "Principal",
|
|
67
|
+
elements: [
|
|
68
|
+
{
|
|
69
|
+
label: "Foto",
|
|
70
|
+
type: "file",
|
|
71
|
+
dataType: "text",
|
|
72
|
+
name: "pictureFile",
|
|
73
|
+
storageConfig: {
|
|
74
|
+
fileNameStrategy: "uuid",
|
|
75
|
+
path: "movies",
|
|
76
|
+
visibility: "public",
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
type: "input",
|
|
81
|
+
dataType: "text",
|
|
82
|
+
label: "Nome",
|
|
83
|
+
name: "name",
|
|
84
|
+
isRequired: true,
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
type: "input",
|
|
88
|
+
dataType: "wysiwyg",
|
|
89
|
+
label: "Descrição",
|
|
90
|
+
name: "description",
|
|
91
|
+
isRequired: true,
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
type: "input",
|
|
95
|
+
dataType: "date",
|
|
96
|
+
label: "Data de lançamento",
|
|
97
|
+
name: "releaseDate",
|
|
98
|
+
isRequired: true,
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
type: "input",
|
|
102
|
+
name: "imdbRating",
|
|
103
|
+
label: "Pontuação do IMDb",
|
|
104
|
+
dataType: "number",
|
|
105
|
+
isRequired: true,
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
type: "autocomplete",
|
|
109
|
+
dataType: "text",
|
|
110
|
+
label: "Gêneros",
|
|
111
|
+
name: "movieGenres",
|
|
112
|
+
optionsApi: {
|
|
113
|
+
endpoint: "/api/movies-genres",
|
|
114
|
+
labelField: ["name"],
|
|
115
|
+
valueField: "_id",
|
|
116
|
+
paramsToFilter: ["name"],
|
|
117
|
+
paramType: "query",
|
|
118
|
+
},
|
|
119
|
+
isMultiple: true,
|
|
120
|
+
isRequired: true,
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
type: "input",
|
|
124
|
+
name: "link1",
|
|
125
|
+
label: "Link 1",
|
|
126
|
+
dataType: "text",
|
|
127
|
+
isRequired: true,
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
type: "input",
|
|
131
|
+
name: "link2",
|
|
132
|
+
label: "Link 2",
|
|
133
|
+
dataType: "text",
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
type: "input",
|
|
137
|
+
name: "link3",
|
|
138
|
+
label: "Link 3",
|
|
139
|
+
dataType: "text",
|
|
140
|
+
},
|
|
141
|
+
],
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
id: "episodesTab",
|
|
145
|
+
title: "Episódios",
|
|
146
|
+
elements: [
|
|
147
|
+
{
|
|
148
|
+
type: "array",
|
|
149
|
+
id: "episodes",
|
|
150
|
+
name: "episodes",
|
|
151
|
+
title: "Episódio",
|
|
152
|
+
elements: [
|
|
153
|
+
{
|
|
154
|
+
type: "input",
|
|
155
|
+
dataType: "text",
|
|
156
|
+
label: "Título do episódio",
|
|
157
|
+
name: "episodeTitle",
|
|
158
|
+
isRequired: true,
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
type: "input",
|
|
162
|
+
dataType: "wysiwyg",
|
|
163
|
+
label: "Descrição do episódio",
|
|
164
|
+
name: "episodeDescription",
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
type: "input",
|
|
168
|
+
dataType: "date",
|
|
169
|
+
label: "Data de lançamento do episódio",
|
|
170
|
+
name: "episodeReleaseDate",
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
type: "autocomplete",
|
|
174
|
+
dataType: "text",
|
|
175
|
+
name: "charactersId",
|
|
176
|
+
label: "Personagens no episódio",
|
|
177
|
+
optionsApi: {
|
|
178
|
+
endpoint: "/characters",
|
|
179
|
+
labelField: ["characterName"],
|
|
180
|
+
valueField: "_id",
|
|
181
|
+
paramsToFilter: ["characterName"],
|
|
182
|
+
paramType: "query",
|
|
183
|
+
relatedEntity: "Character",
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
],
|
|
187
|
+
},
|
|
188
|
+
],
|
|
189
|
+
conditions: [
|
|
190
|
+
{
|
|
191
|
+
type: "form",
|
|
192
|
+
elements: [
|
|
193
|
+
{
|
|
194
|
+
key: "movieGenres",
|
|
195
|
+
comparisonOperator: "===",
|
|
196
|
+
value: "Série de TV",
|
|
197
|
+
},
|
|
198
|
+
],
|
|
199
|
+
},
|
|
200
|
+
],
|
|
201
|
+
},
|
|
202
|
+
],
|
|
203
|
+
},
|
|
204
|
+
],
|
|
205
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { IForm } from "../../../interfaces/form.interface";
|
|
2
|
+
|
|
3
|
+
export const movieGenreForm: IForm = {
|
|
4
|
+
title: "Gerenciar gênero de filme",
|
|
5
|
+
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.`,
|
|
6
|
+
componentType: "form",
|
|
7
|
+
contracts: [
|
|
8
|
+
{
|
|
9
|
+
endpoint: "/movie-genres",
|
|
10
|
+
methods: [{ verb: "POST" }, { verb: "PUT" }, { verb: "GET" }, { verb: "DELETE" }],
|
|
11
|
+
request: {
|
|
12
|
+
body: [
|
|
13
|
+
{
|
|
14
|
+
name: "name",
|
|
15
|
+
dataType: "text",
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: "description",
|
|
19
|
+
dataType: "wysiwyg",
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
id: "movieGenreForm",
|
|
26
|
+
guards: "isAuthorized",
|
|
27
|
+
elements: [
|
|
28
|
+
{
|
|
29
|
+
type: "input",
|
|
30
|
+
dataType: "text",
|
|
31
|
+
label: "Nome",
|
|
32
|
+
name: "name",
|
|
33
|
+
isRequired: true,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
type: "input",
|
|
37
|
+
dataType: "wysiwyg",
|
|
38
|
+
label: "Descrição",
|
|
39
|
+
name: "description",
|
|
40
|
+
isRequired: true,
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
};
|