rapida-partner 1.19.0 → 2.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.
Files changed (92) hide show
  1. package/README.md +73 -43
  2. package/index.ts +87 -13
  3. package/package.json +2 -2
  4. package/src/controllers/ts_project_to_json_project.ts +12 -11
  5. package/src/enums/form.enum.ts +3 -0
  6. package/src/examples/components/forms/actor.form.ts +57 -5
  7. package/src/examples/components/forms/character.form.ts +6 -1
  8. package/src/examples/components/forms/company.form.ts +9 -5
  9. package/src/examples/components/forms/movie.form.ts +21 -5
  10. package/src/examples/components/forms/movieEpisode.form.ts +10 -5
  11. package/src/examples/components/forms/movieGenre.form.ts +6 -1
  12. package/src/examples/components/forms/person.form.ts +9 -14
  13. package/src/examples/components/forms/project.form.ts +295 -0
  14. package/src/examples/components/forms/taskWithProject.form.ts +310 -0
  15. package/src/examples/components/lists/actor.list.ts +15 -9
  16. package/src/examples/components/lists/character.list.ts +13 -7
  17. package/src/examples/components/lists/movie.list.ts +104 -24
  18. package/src/examples/components/lists/movieEpisode.list.ts +17 -11
  19. package/src/examples/components/lists/movieGenre.list.ts +12 -6
  20. package/src/examples/components/lists/project.list.ts +78 -0
  21. package/src/examples/components/lists/taskWithProject.list.ts +202 -0
  22. package/src/examples/components/tables/character.table.ts +40 -0
  23. package/src/examples/modules/character.ts +1 -0
  24. package/src/examples/modules/project.ts +18 -0
  25. package/src/examples/projects/assets/images/favicon/android-chrome-192x192.png +0 -0
  26. package/src/examples/projects/assets/images/favicon/android-chrome-512x512.png +0 -0
  27. package/src/examples/projects/assets/images/favicon/apple-touch-icon.png +0 -0
  28. package/src/examples/projects/assets/images/favicon/favicon-16x16.png +0 -0
  29. package/src/examples/projects/assets/images/favicon/favicon-32x32.png +0 -0
  30. package/src/examples/projects/assets/images/favicon/favicon.ico +0 -0
  31. package/src/examples/projects/assets/images/logo.png +0 -0
  32. package/src/examples/projects/movieBackoffice.ts +62 -62
  33. package/src/interfaces/ai-agent.interface.ts +179 -0
  34. package/src/interfaces/condition.interface.ts +2 -3
  35. package/src/interfaces/data-chart.interface.ts +74 -56
  36. package/src/interfaces/data-table.interface.ts +43 -0
  37. package/src/interfaces/form-array.interface.ts +1 -0
  38. package/src/interfaces/form-autocomplete.interface.ts +1 -0
  39. package/src/interfaces/form-checkbox.interface.ts +27 -0
  40. package/src/interfaces/form-contract.interface.ts +12 -2
  41. package/src/interfaces/form-file.interface.ts +1 -1
  42. package/src/interfaces/form-input.interface.ts +18 -3
  43. package/src/interfaces/form-radio.interface.ts +27 -0
  44. package/src/interfaces/form-select.interface.ts +1 -1
  45. package/src/interfaces/form.interface.ts +13 -4
  46. package/src/interfaces/kanban.interface.ts +82 -0
  47. package/src/interfaces/list.interface.ts +15 -1
  48. package/src/interfaces/notification.interface.ts +27 -0
  49. package/src/interfaces/project-backend.interface.ts +61 -2
  50. package/src/interfaces/project-repositories.interface.ts +18 -0
  51. package/src/interfaces/project-style.interface.ts +15 -96
  52. package/src/interfaces/project.interface.ts +52 -5
  53. package/src/interfaces/record-reminder.interface.ts +14 -0
  54. package/src/interfaces/trusted-caller.interface.ts +21 -0
  55. package/src/schemas/ai-agent-config.ref.json +232 -0
  56. package/src/schemas/backend.ref.json +87 -1
  57. package/src/schemas/component-one-of.ref.json +4 -1
  58. package/src/schemas/data-chart.ref.json +3 -0
  59. package/src/schemas/data-table.ref.json +24 -0
  60. package/src/schemas/form-array.ref.json +3 -0
  61. package/src/schemas/form-autocomplete.ref.json +6 -0
  62. package/src/schemas/form-checkbox.ref.json +73 -0
  63. package/src/schemas/form-contract-request.ref.json +1 -0
  64. package/src/schemas/form-contract.ref.json +2 -1
  65. package/src/schemas/form-input.ref.json +8 -2
  66. package/src/schemas/form-one-of.ref.json +4 -2
  67. package/src/schemas/form-public-contract.ref.json +16 -5
  68. package/src/schemas/form-radio.ref.json +73 -0
  69. package/src/schemas/form-switch.ref.json +3 -12
  70. package/src/schemas/form.ref.json +14 -50
  71. package/src/schemas/frontend.ref.json +26 -1
  72. package/src/schemas/kanban.ref.json +259 -0
  73. package/src/schemas/list.ref.json +65 -313
  74. package/src/schemas/module.ref.json +3 -0
  75. package/src/schemas/notification-condition.ref.json +20 -0
  76. package/src/schemas/notification-recipients.ref.json +31 -0
  77. package/src/schemas/notification.ref.json +65 -0
  78. package/src/schemas/project-repositories.ref.json +19 -0
  79. package/src/schemas/project-style.ref.json +28 -12
  80. package/src/schemas/project.schema.json +115 -4
  81. package/src/schemas/record-reminder.ref.json +41 -0
  82. package/src/schemas/send-message.ref.json +33 -0
  83. package/src/schemas/trusted-caller.ref.json +28 -0
  84. package/src/schemas/types-datatype.ref.json +1 -0
  85. package/src/utils/json.ts +3 -11
  86. package/src/utils/path.ts +22 -27
  87. package/rapidaObject.json +0 -1
  88. package/src/constants/secrets/database.ts +0 -1
  89. package/src/constants/secrets/others.ts +0 -3
  90. package/src/constants/secrets/storage.ts +0 -1
  91. package/src/schemas/project-style-theme.ref.json +0 -98
  92. package/src/utils/env.ts +0 -9
@@ -22,9 +22,8 @@ export const personForm: IForm = {
22
22
  name: "country",
23
23
  dataType: EDataType.NVARCHAR,
24
24
  options: COUNTRIES_FROM_EARTH.map((country) => ({
25
- label: country.originalName,
25
+ label: country.originalName + " (" + country.countryCode + ")",
26
26
  value: country.englishNameAsValue,
27
- isSelected: country.englishNameAsValue === "brazil",
28
27
  })),
29
28
  isRequired: true,
30
29
  space: 2,
@@ -34,9 +33,9 @@ export const personForm: IForm = {
34
33
  type: "input",
35
34
  dataType: EDataType.NVARCHAR,
36
35
  name: "cpf",
36
+ mask: "000.000.000-00",
37
37
  validators: ["cpf"],
38
38
  isUnique: true,
39
- maskRegex: "^\\d{3}\\.\\d{3}\\.\\d{3}-\\d{2}$",
40
39
  space: 2,
41
40
  conditions: {
42
41
  form: {
@@ -96,7 +95,7 @@ export const personForm: IForm = {
96
95
  {
97
96
  label: "Data de nascimento",
98
97
  type: "input",
99
- dataType: EDataType.DATETIME2,
98
+ dataType: EDataType.DATE,
100
99
  name: "birthday",
101
100
  space: 1,
102
101
  },
@@ -126,9 +125,8 @@ export const personForm: IForm = {
126
125
  dataType: EDataType.NVARCHAR,
127
126
  name: "phoneOneDdi",
128
127
  options: COUNTRIES_FROM_EARTH.map((country) => ({
129
- label: country.countryCode,
128
+ label: country.originalName + " (" + country.countryCode + ")",
130
129
  value: country.countryCode,
131
- isSelected: country.countryCode === "+55",
132
130
  })),
133
131
  space: 1,
134
132
  },
@@ -137,7 +135,6 @@ export const personForm: IForm = {
137
135
  type: "input",
138
136
  dataType: EDataType.NVARCHAR,
139
137
  name: "phoneOne",
140
- maskRegex: "^\\d{15}$",
141
138
  space: 3,
142
139
  },
143
140
  ],
@@ -369,9 +366,8 @@ export const personForm: IForm = {
369
366
  dataType: EDataType.NVARCHAR,
370
367
  name: "phoneTwoDdi",
371
368
  options: COUNTRIES_FROM_EARTH.map((country) => ({
372
- label: country.countryCode,
369
+ label: country.originalName + " (" + country.countryCode + ")",
373
370
  value: country.countryCode,
374
- isSelected: country.countryCode === "+55",
375
371
  })),
376
372
  space: 2,
377
373
  },
@@ -380,7 +376,6 @@ export const personForm: IForm = {
380
376
  type: "input",
381
377
  dataType: EDataType.NVARCHAR,
382
378
  name: "phoneTwo",
383
- maskRegex: "^\\d{15}$",
384
379
  space: 2,
385
380
  },
386
381
  ],
@@ -449,14 +444,14 @@ export const personForm: IForm = {
449
444
  label: "Data de emissão do RG",
450
445
  name: "rgIssueDate",
451
446
  type: "input",
452
- dataType: EDataType.DATETIME2,
447
+ dataType: EDataType.DATE,
453
448
  space: 1,
454
449
  },
455
450
  {
456
451
  label: "Data de validade do RG",
457
452
  name: "rgExpiryDate",
458
453
  type: "input",
459
- dataType: EDataType.DATETIME2,
454
+ dataType: EDataType.DATE,
460
455
  space: 1,
461
456
  },
462
457
  {
@@ -489,14 +484,14 @@ export const personForm: IForm = {
489
484
  {
490
485
  label: "Data de emissão do passaporte",
491
486
  type: "input",
492
- dataType: EDataType.DATETIME2,
487
+ dataType: EDataType.DATE,
493
488
  name: "passportIssueDate",
494
489
  space: 1,
495
490
  },
496
491
  {
497
492
  label: "Data de validade do passaporte",
498
493
  type: "input",
499
- dataType: EDataType.DATETIME2,
494
+ dataType: EDataType.DATE,
500
495
  name: "passportExpiryDate",
501
496
  space: 1,
502
497
  },
@@ -0,0 +1,295 @@
1
+ import { EDataType } from "../../../enums/form.enum";
2
+ import type { IForm } from "../../../interfaces/form.interface";
3
+
4
+ export const projectForm: IForm = {
5
+ title: "Gerenciar projeto",
6
+ id: "projectForm",
7
+ componentType: "form",
8
+ guards: "isAuthorized",
9
+ elements: [
10
+ {
11
+ type: "tab",
12
+ id: "projectTab",
13
+ tabs: [
14
+ {
15
+ title: "Dados principais",
16
+ id: "projectMainDataTab",
17
+ elements: [
18
+ {
19
+ label: "Identificador do projeto",
20
+ name: "identifier",
21
+ type: "input",
22
+ dataType: EDataType.NVARCHAR,
23
+ isRequired: true,
24
+ },
25
+ {
26
+ label: "Título do projeto",
27
+ name: "title",
28
+ type: "input",
29
+ dataType: EDataType.NVARCHAR,
30
+ isRequired: true,
31
+ },
32
+ {
33
+ label: "Descrição do projeto",
34
+ name: "description",
35
+ type: "input",
36
+ dataType: EDataType.WYSIWYG,
37
+ storageConfig: {
38
+ fileNameStrategy: "uuid",
39
+ path: "projects/description-images",
40
+ visibility: "public",
41
+ },
42
+ },
43
+ {
44
+ label: "Adicionar pessoa relacionada ao projeto",
45
+ name: "projectsPeople",
46
+ type: "array",
47
+ elements: [
48
+ {
49
+ label: "Pessoa",
50
+ name: "personId",
51
+ type: "autocomplete",
52
+ dataType: EDataType.UNIQUEIDENTIFIER,
53
+ optionsApi: {
54
+ relatedEntity: "people",
55
+ labelField: ["name", "cpf"],
56
+ valueField: "_id",
57
+ paramsToFilter: ["name", "cpf"],
58
+ paramType: "query",
59
+ endpoint: "/people",
60
+ },
61
+ },
62
+ {
63
+ label: "Relacionamentos",
64
+ name: "projectsPeopleRelationships",
65
+ type: "select",
66
+ dataType: EDataType.NVARCHAR,
67
+ options: [
68
+ {
69
+ label: "Cliente",
70
+ value: "customer",
71
+ },
72
+ {
73
+ label: "Fornecedor",
74
+ value: "supplier",
75
+ },
76
+ {
77
+ label: "Desenvolvedor",
78
+ value: "developer",
79
+ },
80
+ ],
81
+ isMultiple: true,
82
+ },
83
+ ],
84
+ },
85
+ {
86
+ label: "Adicionar empresa relacionada ao projeto",
87
+ name: "projectsCompanies",
88
+ type: "array",
89
+ elements: [
90
+ {
91
+ label: "Empresa",
92
+ name: "companyId",
93
+ type: "autocomplete",
94
+ dataType: EDataType.UNIQUEIDENTIFIER,
95
+ optionsApi: {
96
+ endpoint: "/companies",
97
+ labelField: ["name", "cnpj"],
98
+ paramsToFilter: ["name", "cnpj"],
99
+ paramType: "query",
100
+ relatedEntity: "companies",
101
+ valueField: "_id",
102
+ },
103
+ },
104
+ {
105
+ label: "Relacionamentos",
106
+ name: "projectsCompaniesRelationships",
107
+ type: "select",
108
+ dataType: EDataType.NVARCHAR,
109
+ options: [
110
+ {
111
+ label: "Cliente",
112
+ value: "customer",
113
+ },
114
+ {
115
+ label: "Fornecedor",
116
+ value: "supplier",
117
+ },
118
+ ],
119
+ isMultiple: true,
120
+ },
121
+ ],
122
+ },
123
+ ],
124
+ },
125
+ {
126
+ id: "businessTab",
127
+ title: "Dados de negócio",
128
+ elements: [
129
+ {
130
+ label: "Valor do negócio",
131
+ name: "businessValue",
132
+ type: "input",
133
+ dataType: EDataType.WYSIWYG,
134
+ storageConfig: {
135
+ fileNameStrategy: "uuid",
136
+ path: "projects/business-value-images",
137
+ visibility: "public",
138
+ },
139
+ },
140
+ {
141
+ label: "Público-alvo",
142
+ name: "targetMarket",
143
+ type: "input",
144
+ dataType: EDataType.WYSIWYG,
145
+ storageConfig: {
146
+ fileNameStrategy: "uuid",
147
+ path: "projects/target-market-images",
148
+ visibility: "public",
149
+ },
150
+ },
151
+ {
152
+ label: "Benchmarkings",
153
+ name: "benchmarkings",
154
+ type: "input",
155
+ dataType: EDataType.WYSIWYG,
156
+ storageConfig: {
157
+ fileNameStrategy: "uuid",
158
+ path: "projects/benchmarkings-images",
159
+ visibility: "public",
160
+ },
161
+ },
162
+ {
163
+ label: "Legalidades",
164
+ name: "legalIssues",
165
+ type: "input",
166
+ dataType: EDataType.WYSIWYG,
167
+ storageConfig: {
168
+ fileNameStrategy: "uuid",
169
+ path: "projects/legal-issues-images",
170
+ visibility: "public",
171
+ },
172
+ },
173
+ {
174
+ label: "Questões éticas",
175
+ name: "ethicalIssues",
176
+ type: "input",
177
+ dataType: EDataType.WYSIWYG,
178
+ storageConfig: {
179
+ fileNameStrategy: "uuid",
180
+ path: "projects/ethical-issues-images",
181
+ visibility: "public",
182
+ },
183
+ },
184
+ {
185
+ label: "Pós-venda",
186
+ name: "afterSales",
187
+ type: "input",
188
+ dataType: EDataType.WYSIWYG,
189
+ storageConfig: {
190
+ fileNameStrategy: "uuid",
191
+ path: "projects/after-sales-images",
192
+ visibility: "public",
193
+ },
194
+ },
195
+ {
196
+ label: "Monetização",
197
+ name: "monetization",
198
+ type: "input",
199
+ dataType: EDataType.WYSIWYG,
200
+ storageConfig: {
201
+ fileNameStrategy: "uuid",
202
+ path: "projects/monetization-images",
203
+ visibility: "public",
204
+ },
205
+ },
206
+ ],
207
+ },
208
+ {
209
+ id: "projectFilesTab",
210
+ title: "Arquivos do projeto",
211
+ elements: [
212
+ {
213
+ label: "Adicionar arquivo do projeto",
214
+ name: "projectsFiles",
215
+ type: "array",
216
+ elements: [
217
+ {
218
+ label: "Nome do arquivo",
219
+ name: "fileName",
220
+ type: "input",
221
+ dataType: EDataType.NVARCHAR,
222
+ isRequired: true,
223
+ },
224
+ {
225
+ label: "Descrição do arquivo",
226
+ name: "fileDescription",
227
+ type: "input",
228
+ dataType: EDataType.WYSIWYG,
229
+ storageConfig: {
230
+ fileNameStrategy: "uuid",
231
+ path: "projects/file-description-images",
232
+ visibility: "public",
233
+ },
234
+ },
235
+ {
236
+ label: "Arquivo do projeto",
237
+ name: "fileUrl",
238
+ dataType: EDataType.NVARCHAR,
239
+ type: "file",
240
+ storageConfig: {
241
+ fileNameStrategy: "uuid",
242
+ path: "projects/files",
243
+ visibility: "private",
244
+ },
245
+ },
246
+ ],
247
+ },
248
+ ],
249
+ },
250
+ {
251
+ title: "Links relacionados",
252
+ id: "softwareDevelopmentLinksTab",
253
+ elements: [
254
+ {
255
+ type: "array",
256
+ name: "relatedLinks",
257
+ label: "Link relacionado",
258
+ elements: [
259
+ {
260
+ label: "Link",
261
+ name: "relatedLink",
262
+ type: "input",
263
+ dataType: EDataType.NVARCHAR,
264
+ isRequired: true,
265
+ },
266
+ {
267
+ label: "Descrição",
268
+ name: "relatedLinkDescription",
269
+ type: "input",
270
+ dataType: EDataType.WYSIWYG,
271
+ storageConfig: {
272
+ fileNameStrategy: "uuid",
273
+ path: "projects/related-link-description-images",
274
+ visibility: "public",
275
+ },
276
+ },
277
+ ],
278
+ }
279
+ ],
280
+ },
281
+ ],
282
+ },
283
+ ],
284
+ contracts: [
285
+ {
286
+ id: "projects",
287
+ endpoint: "/projects",
288
+ actions: ["create", "update", "get", "getById", "softDelete"],
289
+ request: {
290
+ entity: "projects",
291
+ fields: [],
292
+ },
293
+ },
294
+ ],
295
+ };
@@ -0,0 +1,310 @@
1
+ import { EDataType } from "../../../enums/form.enum";
2
+ import type { IForm } from "../../../interfaces/form.interface";
3
+
4
+ export const taskWithProjectForm: IForm = {
5
+ title: "Gerenciar tarefa",
6
+ id: "taskWithProjectForm",
7
+ componentType: "form",
8
+ icon: "check-square",
9
+ elements: [
10
+ {
11
+ label: "Título",
12
+ type: "input",
13
+ dataType: EDataType.NVARCHAR,
14
+ name: "title",
15
+ placeholder: "Digite o título da tarefa",
16
+ tooltip: "Título descritivo da tarefa",
17
+ isRequired: true,
18
+ space: 2,
19
+ },
20
+ {
21
+ type: "autocomplete",
22
+ dataType: EDataType.UNIQUEIDENTIFIER,
23
+ label: "Projeto",
24
+ name: "projectId",
25
+ isRequired: true,
26
+ optionsApi: {
27
+ endpoint: "/projects",
28
+ labelField: ["title", "identifier"],
29
+ valueField: "_id",
30
+ paramType: "query",
31
+ relatedEntity: "projects",
32
+ paramsToFilter: ["title", "identifier"],
33
+ },
34
+ space: 2,
35
+ },
36
+ {
37
+ label: "Descrição",
38
+ type: "input",
39
+ dataType: EDataType.WYSIWYG,
40
+ name: "description",
41
+ placeholder: "Descreva a tarefa",
42
+ tooltip: "Detalhes adicionais sobre a tarefa",
43
+ storageConfig: {
44
+ fileNameStrategy: "uuid",
45
+ path: "tasks/description-images",
46
+ visibility: "public",
47
+ },
48
+ },
49
+ {
50
+ label: "Arquivo relacionado",
51
+ type: "file",
52
+ name: "fileUrl",
53
+ dataType: EDataType.NVARCHAR,
54
+ storageConfig: {
55
+ path: "tasks/files",
56
+ fileNameStrategy: "uuid",
57
+ visibility: "private",
58
+ },
59
+ },
60
+ {
61
+ label: "Prioridade",
62
+ type: "select",
63
+ dataType: EDataType.INTEGER,
64
+ name: "priority",
65
+ placeholder: "Selecione a prioridade da tarefa",
66
+ tooltip: "Nível de urgência da tarefa",
67
+ isRequired: true,
68
+ options: [
69
+ { label: "Baixa", value: 3 },
70
+ { label: "Média", value: 2 },
71
+ { label: "Alta", value: 1 },
72
+ { label: "Urgente", value: 0 },
73
+ ],
74
+ space: 1,
75
+ },
76
+ {
77
+ label: "Complexidade",
78
+ type: "select",
79
+ dataType: EDataType.INTEGER,
80
+ name: "complexity",
81
+ placeholder: "Selecione a complexidade da tarefa",
82
+ tooltip: "Nível de complexidade da tarefa",
83
+ isRequired: true,
84
+ options: [
85
+ { label: "Baixa", value: 1 },
86
+ { label: "Média", value: 2 },
87
+ { label: "Alta", value: 3 },
88
+ { label: "Muito alta", value: 4 },
89
+ { label: "Precisa de estudo", value: 0 },
90
+ ],
91
+ space: 1,
92
+ },
93
+ {
94
+ label: "Status",
95
+ type: "select",
96
+ dataType: EDataType.NVARCHAR,
97
+ name: "status",
98
+ options: [
99
+ { label: "Pendente", value: "pending", isSelected: true },
100
+ { label: "Em andamento", value: "inProgress" },
101
+ { label: "Aguardando validação técnica", value: "awaitingValidation" },
102
+ { label: "Aguardando homologação", value: "awaitingApproval" },
103
+ { label: "Pendência pós-validação", value: "postValidationPending" },
104
+ { label: "Pendência pós-homologação", value: "postApprovalPending" },
105
+ { label: "Finalizado", value: "completed" },
106
+ ],
107
+ isRequired: true,
108
+ space: 1,
109
+ },
110
+ {
111
+ label: "Data desejada para a entrega",
112
+ name: "expectedDeliveryDate",
113
+ type: "input",
114
+ dataType: EDataType.DATE,
115
+ space: 1,
116
+ },
117
+ {
118
+ label: "Data de início",
119
+ type: "input",
120
+ dataType: EDataType.DATE,
121
+ name: "startDate",
122
+ space: 1,
123
+ },
124
+ {
125
+ label: "Desenvolvedor",
126
+ name: "developerId",
127
+ type: "autocomplete",
128
+ dataType: EDataType.UNIQUEIDENTIFIER,
129
+ optionsApi: {
130
+ relatedEntity: "profiles",
131
+ endpoint: "/profiles",
132
+ labelField: ["name", "userName"],
133
+ valueField: "_id",
134
+ paramsToFilter: ["name", "userName"],
135
+ paramType: "query",
136
+ },
137
+ space: 1,
138
+ },
139
+ {
140
+ label: "Validador",
141
+ type: "autocomplete",
142
+ dataType: EDataType.UNIQUEIDENTIFIER,
143
+ name: "validatorId",
144
+ optionsApi: {
145
+ relatedEntity: "profiles",
146
+ endpoint: "/profiles",
147
+ labelField: ["name", "userName"],
148
+ valueField: "_id",
149
+ paramsToFilter: ["name", "userName"],
150
+ paramType: "query",
151
+ },
152
+ space: 1,
153
+ },
154
+ {
155
+ label: "Homologador",
156
+ type: "autocomplete",
157
+ dataType: EDataType.UNIQUEIDENTIFIER,
158
+ name: "approverId",
159
+ optionsApi: {
160
+ relatedEntity: "profiles",
161
+ endpoint: "/profiles",
162
+ labelField: ["name", "userName"],
163
+ valueField: "_id",
164
+ paramsToFilter: ["name", "userName"],
165
+ paramType: "query",
166
+ },
167
+ space: 1,
168
+ },
169
+ {
170
+ label: "Adicionar entrega",
171
+ type: "array",
172
+ name: "deliveries",
173
+ elements: [
174
+ {
175
+ label: "Data de entrega",
176
+ type: "input",
177
+ dataType: EDataType.DATE,
178
+ name: "dueDate",
179
+ placeholder: "Selecione a data de vencimento",
180
+ tooltip: "Data limite para conclusão da tarefa",
181
+ isRequired: true,
182
+ businessRules: [
183
+ // todo
184
+ {
185
+ rule: {
186
+ description: "defaultvalue: " + new Date().toISOString(),
187
+ },
188
+ },
189
+ ],
190
+ },
191
+ {
192
+ label: "Comentário",
193
+ type: "input",
194
+ dataType: EDataType.WYSIWYG,
195
+ name: "deliveryComment",
196
+ placeholder: "Digite o comentário",
197
+ tooltip: "Comentário sobre a entrega",
198
+ storageConfig: {
199
+ fileNameStrategy: "uuid",
200
+ path: "tasks/delivery-comment-images",
201
+ visibility: "public",
202
+ },
203
+ },
204
+ ],
205
+ },
206
+ {
207
+ label: "Adicionar validação",
208
+ type: "array",
209
+ name: "validations",
210
+ elements: [
211
+ {
212
+ label: "Data de validação",
213
+ type: "input",
214
+ dataType: EDataType.DATE,
215
+ name: "validationDate",
216
+ isRequired: true,
217
+ businessRules: [
218
+ // todo
219
+ {
220
+ rule: {
221
+ description: "defaultvalue: " + new Date().toISOString(),
222
+ },
223
+ },
224
+ ],
225
+ },
226
+ {
227
+ label: "Comentário",
228
+ type: "input",
229
+ dataType: EDataType.WYSIWYG,
230
+ name: "validationComment",
231
+ placeholder: "Digite o comentário",
232
+ tooltip: "Comentário sobre a validação",
233
+ storageConfig: {
234
+ fileNameStrategy: "uuid",
235
+ path: "tasks/validation-comment-images",
236
+ visibility: "public",
237
+ },
238
+ },
239
+ {
240
+ label: "Arquivo relacionado",
241
+ type: "file",
242
+ name: "fileUrlValidation",
243
+ dataType: EDataType.NVARCHAR,
244
+ storageConfig: {
245
+ path: "tasks/files",
246
+ fileNameStrategy: "uuid",
247
+ visibility: "private",
248
+ },
249
+ },
250
+ ],
251
+ },
252
+ {
253
+ label: "Adicionar homologação",
254
+ type: "array",
255
+ name: "approvals",
256
+ elements: [
257
+ {
258
+ label: "Data de homologação",
259
+ type: "input",
260
+ dataType: EDataType.DATE,
261
+ name: "approvalDate",
262
+ isRequired: true,
263
+ businessRules: [
264
+ // todo
265
+ {
266
+ rule: {
267
+ description: "defaultvalue: " + new Date().toISOString(),
268
+ },
269
+ },
270
+ ],
271
+ },
272
+ {
273
+ label: "Comentário",
274
+ type: "input",
275
+ dataType: EDataType.WYSIWYG,
276
+ name: "approvalComment",
277
+ placeholder: "Digite o comentário",
278
+ tooltip: "Comentário sobre a homologação",
279
+ storageConfig: {
280
+ fileNameStrategy: "uuid",
281
+ path: "tasks/approval-comment-images",
282
+ visibility: "public",
283
+ },
284
+ },
285
+ {
286
+ label: "Arquivo relacionado",
287
+ type: "file",
288
+ name: "fileUrlApproval",
289
+ dataType: EDataType.NVARCHAR,
290
+ storageConfig: {
291
+ path: "tasks/files",
292
+ fileNameStrategy: "uuid",
293
+ visibility: "private",
294
+ },
295
+ },
296
+ ],
297
+ },
298
+ ],
299
+ contracts: [
300
+ {
301
+ id: "tasks",
302
+ endpoint: "/tasks",
303
+ actions: ["create", "update", "get", "softDelete", "getById"],
304
+ request: {
305
+ entity: "tasks",
306
+ fields: [],
307
+ },
308
+ },
309
+ ],
310
+ };