rapida-partner 1.19.1 → 2.1.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 (93) 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 +0 -1
  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 +2 -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-file.ref.json +4 -0
  66. package/src/schemas/form-input.ref.json +8 -2
  67. package/src/schemas/form-one-of.ref.json +4 -2
  68. package/src/schemas/form-public-contract.ref.json +16 -5
  69. package/src/schemas/form-radio.ref.json +73 -0
  70. package/src/schemas/form-switch.ref.json +3 -12
  71. package/src/schemas/form.ref.json +14 -50
  72. package/src/schemas/frontend.ref.json +26 -1
  73. package/src/schemas/kanban.ref.json +259 -0
  74. package/src/schemas/list.ref.json +65 -313
  75. package/src/schemas/module.ref.json +3 -0
  76. package/src/schemas/notification-condition.ref.json +20 -0
  77. package/src/schemas/notification-recipients.ref.json +31 -0
  78. package/src/schemas/notification.ref.json +65 -0
  79. package/src/schemas/project-repositories.ref.json +19 -0
  80. package/src/schemas/project-style.ref.json +28 -12
  81. package/src/schemas/project.schema.json +115 -4
  82. package/src/schemas/record-reminder.ref.json +41 -0
  83. package/src/schemas/send-message.ref.json +33 -0
  84. package/src/schemas/trusted-caller.ref.json +28 -0
  85. package/src/schemas/types-datatype.ref.json +1 -0
  86. package/src/utils/json.ts +3 -11
  87. package/src/utils/path.ts +22 -27
  88. package/rapidaObject.json +0 -1
  89. package/src/constants/secrets/database.ts +0 -1
  90. package/src/constants/secrets/others.ts +0 -3
  91. package/src/constants/secrets/storage.ts +0 -1
  92. package/src/schemas/project-style-theme.ref.json +0 -98
  93. package/src/utils/env.ts +0 -9
@@ -34,6 +34,10 @@
34
34
  "isMultiple": {
35
35
  "type": "boolean"
36
36
  },
37
+ "isProfilePicture": {
38
+ "type": "boolean",
39
+ "description": "Marks this file element as the user's profile picture. Only meaningful in flows.profiles.personProfile/companyProfile forms, at most one per form and never inside an array element."
40
+ },
37
41
  "maxSize": {
38
42
  "type": "number"
39
43
  },
@@ -71,8 +71,14 @@
71
71
  "apiRequest": {
72
72
  "$ref": "form-common-api-request.ref.json"
73
73
  },
74
- "maskRegex": {
75
- "type": "string"
74
+ "mask": {
75
+ "type": [
76
+ "string",
77
+ "array"
78
+ ],
79
+ "items": {
80
+ "type": "string"
81
+ }
76
82
  },
77
83
  "suffix": {
78
84
  "type": "string"
@@ -17,7 +17,9 @@
17
17
  { "$ref": "form-datepicker.ref.json" },
18
18
  { "$ref": "form-radiogroup.ref.json" },
19
19
  { "$ref": "form-switch.ref.json" },
20
- { "$ref": "form-inheritance.ref.json" }
20
+ { "$ref": "form-inheritance.ref.json" },
21
+ { "$ref": "form-checkbox.ref.json" },
22
+ { "$ref": "form-radio.ref.json" }
21
23
  ]
22
24
  }
23
- }
25
+ }
@@ -25,11 +25,20 @@
25
25
  ]
26
26
  }
27
27
  },
28
- "permissionedUrls": {
28
+ "access": {
29
+ "type": "string",
30
+ "enum": [
31
+ "anonymous",
32
+ "trustedCallers"
33
+ ],
34
+ "description": "'trustedCallers' requires a service JWT signed by one of the active backend's trustedCallers (RFC 7523)."
35
+ },
36
+ "allowedOrigins": {
29
37
  "type": "array",
30
38
  "items": {
31
39
  "type": "string"
32
- }
40
+ },
41
+ "description": "Browser origins allowed via CORS. Does not protect against server-to-server calls."
33
42
  },
34
43
  "request": {
35
44
  "type": "object",
@@ -78,7 +87,8 @@
78
87
  "enum": [
79
88
  "one-to-one",
80
89
  "one-to-many",
81
- "many-to-many"
90
+ "many-to-many",
91
+ "many-to-one"
82
92
  ]
83
93
  },
84
94
  "fields": {
@@ -239,6 +249,7 @@
239
249
  "required": [
240
250
  "id",
241
251
  "endpoint",
242
- "actions"
252
+ "actions",
253
+ "access"
243
254
  ]
244
- }
255
+ }
@@ -0,0 +1,73 @@
1
+ {
2
+ "$id": "form-radio.ref.json",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "type": "object",
5
+ "properties": {
6
+ "type": {
7
+ "const": "radio"
8
+ },
9
+ "name": {
10
+ "type": "string"
11
+ },
12
+ "label": {
13
+ "type": "string"
14
+ },
15
+ "options": {
16
+ "type": "array",
17
+ "items": {
18
+ "type": "object",
19
+ "properties": {
20
+ "label": {
21
+ "type": "string"
22
+ },
23
+ "value": {
24
+ "oneOf": [
25
+ { "type": "string" },
26
+ { "type": "number" },
27
+ { "type": "boolean" }
28
+ ]
29
+ },
30
+ "isDisabled": {
31
+ "type": "boolean"
32
+ },
33
+ "isSelected": {
34
+ "type": "boolean"
35
+ }
36
+ },
37
+ "required": ["label", "value"]
38
+ }
39
+ },
40
+ "tooltip": {
41
+ "type": "string"
42
+ },
43
+ "isDisabled": {
44
+ "type": "boolean"
45
+ },
46
+ "isDisabledOnUpdate": {
47
+ "type": "boolean"
48
+ },
49
+ "isHidden": {
50
+ "type": "boolean"
51
+ },
52
+ "isRequired": {
53
+ "type": "boolean"
54
+ },
55
+ "conditions": {
56
+ "$ref": "condition.ref.json"
57
+ },
58
+ "todo": {
59
+ "type": "string"
60
+ },
61
+ "businessRules": {
62
+ "$ref": "business-rules.ref.json"
63
+ },
64
+ "elementDescription": {
65
+ "type": "string"
66
+ },
67
+ "space": {
68
+ "type": "number",
69
+ "enum": [1, 2, 3, 4]
70
+ }
71
+ },
72
+ "required": ["type", "name", "label", "options"]
73
+ }
@@ -39,20 +39,11 @@
39
39
  },
40
40
  "space": {
41
41
  "type": "number",
42
- "enum": [
43
- 1,
44
- 2,
45
- 3,
46
- 4
47
- ]
42
+ "enum": [1, 2, 3, 4]
48
43
  },
49
44
  "elementDescription": {
50
45
  "type": "string"
51
46
  }
52
47
  },
53
- "required": [
54
- "type",
55
- "name",
56
- "label"
57
- ]
58
- }
48
+ "required": ["type", "name", "label"]
49
+ }
@@ -12,6 +12,9 @@
12
12
  "title": {
13
13
  "type": "string"
14
14
  },
15
+ "subtitle": {
16
+ "type": "string"
17
+ },
15
18
  "icon": {
16
19
  "type": "string"
17
20
  },
@@ -46,56 +49,17 @@
46
49
  "flowChart": {
47
50
  "$ref": "form-flowchart.ref.json"
48
51
  },
49
- "kanban": {
50
- "type": "object",
51
- "properties": {
52
- "status": {
53
- "type": "string",
54
- "enum": [
55
- "toDo",
56
- "inProgress",
57
- "done"
58
- ]
59
- },
60
- "assignesIds": {
61
- "type": "array",
62
- "items": {
63
- "type": "string"
64
- }
65
- },
66
- "validatorsIds": {
67
- "type": "array",
68
- "items": {
69
- "type": "string"
70
- }
71
- },
72
- "dueDate": {
73
- "type": "string",
74
- "format": "date-time"
75
- },
76
- "tags": {
77
- "type": "array",
78
- "items": {
79
- "type": "string"
80
- }
81
- },
82
- "priority": {
83
- "type": "string",
84
- "enum": [
85
- "low",
86
- "medium",
87
- "high",
88
- "urgent"
89
- ]
90
- },
91
- "storyPoints": {
92
- "type": "number",
93
- "minimum": 0
94
- }
95
- },
96
- "required": [
97
- "status"
98
- ]
52
+ "sendMessage": {
53
+ "type": "array",
54
+ "items": {
55
+ "$ref": "send-message.ref.json"
56
+ }
57
+ },
58
+ "reminders": {
59
+ "type": "array",
60
+ "items": {
61
+ "$ref": "record-reminder.ref.json"
62
+ }
99
63
  }
100
64
  },
101
65
  "required": [
@@ -2,6 +2,18 @@
2
2
  "$id": "frontend.ref.json",
3
3
  "type": "object",
4
4
  "properties": {
5
+ "environment": {
6
+ "type": "string"
7
+ },
8
+ "baseUrl": {
9
+ "type": "string"
10
+ },
11
+ "apiBaseUrl": {
12
+ "type": "string"
13
+ },
14
+ "isActiveEnvironment": {
15
+ "type": "boolean"
16
+ },
5
17
  "framework": {
6
18
  "type": "string",
7
19
  "enum": [
@@ -21,10 +33,23 @@
21
33
  "material",
22
34
  "flowbite"
23
35
  ]
36
+ },
37
+ "logoPath": {
38
+ "type": "string"
39
+ },
40
+ "faviconPath": {
41
+ "type": "string"
42
+ },
43
+ "isSsr": {
44
+ "type": "boolean"
24
45
  }
25
46
  },
26
47
  "required": [
27
48
  "framework",
28
- "uiKit"
49
+ "uiKit",
50
+ "isActiveEnvironment",
51
+ "environment",
52
+ "baseUrl",
53
+ "apiBaseUrl"
29
54
  ]
30
55
  }
@@ -0,0 +1,259 @@
1
+ {
2
+ "$id": "kanban.ref.json",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "type": "object",
5
+ "properties": {
6
+ "componentType": {
7
+ "const": "kanban"
8
+ },
9
+ "id": {
10
+ "type": "string"
11
+ },
12
+ "relatedFormId": {
13
+ "type": "string",
14
+ "description": "ID do formulário relacionado para criação/edição de cards (opcional)"
15
+ },
16
+ "boardsProperty": {
17
+ "$ref": "form-autocomplete.ref.json",
18
+ "description": "Element autocomplete que associa o card a um board e precisa estar presente no form de tasks relacionados ao kanban"
19
+ },
20
+ "userStory": {
21
+ "type": "string"
22
+ },
23
+ "guards": {
24
+ "type": "array",
25
+ "items": {
26
+ "type": "string"
27
+ }
28
+ },
29
+ "dataSource": {
30
+ "$ref": "form-common-api-request.ref.json"
31
+ },
32
+ "kanbanColumnsProperty": {
33
+ "oneOf": [
34
+ {
35
+ "$ref": "form-autocomplete.ref.json"
36
+ },
37
+ {
38
+ "$ref": "form-select.ref.json"
39
+ }
40
+ ]
41
+ },
42
+ "businessRules": {
43
+ "$ref": "business-rules.ref.json"
44
+ },
45
+ "kanbanCardItems": {
46
+ "type": "array",
47
+ "items": {
48
+ "type": "object",
49
+ "properties": {
50
+ "property": {
51
+ "type": "string"
52
+ },
53
+ "label": {
54
+ "type": "string"
55
+ },
56
+ "type": {
57
+ "type": "string",
58
+ "enum": [
59
+ "title",
60
+ "subtitle",
61
+ "description",
62
+ "video",
63
+ "image",
64
+ "images",
65
+ "icon",
66
+ "badge",
67
+ "editable"
68
+ ]
69
+ },
70
+ "isHtml": {
71
+ "type": "boolean"
72
+ },
73
+ "isTimestamp": {
74
+ "type": "boolean"
75
+ },
76
+ "callToAction": {
77
+ "type": "object",
78
+ "properties": {
79
+ "link": {
80
+ "type": "string"
81
+ },
82
+ "usePropertyAsQuery": {
83
+ "type": "boolean"
84
+ }
85
+ },
86
+ "required": ["link"]
87
+ },
88
+ "dataType": {
89
+ "$ref": "types-datatype.ref.json"
90
+ },
91
+ "isExpansible": {
92
+ "type": "boolean"
93
+ },
94
+ "conditions": {
95
+ "$ref": "condition.ref.json"
96
+ },
97
+ "businessRules": {
98
+ "$ref": "business-rules.ref.json"
99
+ },
100
+ "todo": {
101
+ "type": "string"
102
+ }
103
+ },
104
+ "required": ["dataType"]
105
+ }
106
+ },
107
+ "kanbanFilters": {
108
+ "$ref": "form-one-of.ref.json"
109
+ },
110
+ "callsToActionMenu": {
111
+ "type": "array",
112
+ "items": {
113
+ "type": "object",
114
+ "properties": {
115
+ "icon": {
116
+ "type": "string"
117
+ },
118
+ "label": {
119
+ "type": "string"
120
+ },
121
+ "action": {
122
+ "type": "object",
123
+ "properties": {
124
+ "linkAfterAction": {
125
+ "type": "object",
126
+ "properties": {
127
+ "endpoint": {
128
+ "type": "string"
129
+ },
130
+ "propertiesAsQueryParam": {
131
+ "type": "array",
132
+ "items": {
133
+ "type": "string"
134
+ }
135
+ },
136
+ "propertiesAsPathParam": {
137
+ "type": "array",
138
+ "items": {
139
+ "type": "string"
140
+ }
141
+ }
142
+ },
143
+ "required": ["endpoint"]
144
+ },
145
+ "link": {
146
+ "type": "object",
147
+ "properties": {
148
+ "endpoint": {
149
+ "type": "string"
150
+ },
151
+ "propertiesAsQueryParam": {
152
+ "type": "array",
153
+ "items": {
154
+ "type": "string"
155
+ }
156
+ },
157
+ "propertiesAsPathParam": {
158
+ "type": "array",
159
+ "items": {
160
+ "type": "string"
161
+ }
162
+ }
163
+ },
164
+ "required": ["endpoint"]
165
+ },
166
+ "request": {
167
+ "type": "object",
168
+ "properties": {
169
+ "endpoint": {
170
+ "type": "string"
171
+ },
172
+ "propertiesAsQueryParam": {
173
+ "type": "array",
174
+ "items": {
175
+ "type": "string"
176
+ }
177
+ },
178
+ "propertiesAsPathParam": {
179
+ "type": "array",
180
+ "items": {
181
+ "type": "string"
182
+ }
183
+ },
184
+ "verb": {
185
+ "type": "string",
186
+ "enum": ["get", "post", "put", "softDelete", "hardDelete"]
187
+ },
188
+ "dialog": {
189
+ "type": "object",
190
+ "properties": {
191
+ "title": {
192
+ "type": "string"
193
+ },
194
+ "message": {
195
+ "type": "string"
196
+ }
197
+ },
198
+ "required": ["title", "message"]
199
+ }
200
+ },
201
+ "required": ["endpoint", "verb"]
202
+ }
203
+ }
204
+ }
205
+ },
206
+ "businessRules": {
207
+ "$ref": "business-rules.ref.json"
208
+ },
209
+ "conditions": {
210
+ "$ref": "condition.ref.json"
211
+ },
212
+ "todo": {
213
+ "type": "string"
214
+ }
215
+ },
216
+ "required": ["icon", "label", "action"]
217
+ },
218
+ "contracts": {
219
+ "type": "array",
220
+ "items": {
221
+ "$ref": "form-contract.ref.json"
222
+ }
223
+ },
224
+ "publicContracts": {
225
+ "type": "array",
226
+ "items": {
227
+ "$ref": "form-public-contract.ref.json"
228
+ }
229
+ },
230
+ "archive": {
231
+ "type": "array",
232
+ "items": {
233
+ "type": "object",
234
+ "properties": {
235
+ "property": {
236
+ "type": "string"
237
+ },
238
+ "value": {
239
+ "type": "string"
240
+ },
241
+ "logicalOperator": {
242
+ "type": "string",
243
+ "enum": ["&&", "!", "nor", "||"]
244
+ }
245
+ },
246
+ "required": ["property", "value"]
247
+ }
248
+ }
249
+ },
250
+ "required": [
251
+ "componentType",
252
+ "id",
253
+ "boardsProperty",
254
+ "dataSource",
255
+ "kanbanColumnsProperty",
256
+ "kanbanCardItems",
257
+ "contracts"
258
+ ]
259
+ }