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
@@ -88,9 +88,7 @@
88
88
  "description": "if true then '/user/<email>'"
89
89
  }
90
90
  },
91
- "required": [
92
- "link"
93
- ]
91
+ "required": ["link"]
94
92
  },
95
93
  "conditions": {
96
94
  "$ref": "condition.ref.json"
@@ -126,9 +124,7 @@
126
124
  "description": "if, for example, ['_id', 'email'], then '/user/<_id>/<email>'"
127
125
  }
128
126
  },
129
- "required": [
130
- "link"
131
- ]
127
+ "required": ["link"]
132
128
  },
133
129
  "callsToActionMenu": {
134
130
  "type": "array",
@@ -168,9 +164,30 @@
168
164
  "description": "if, for example, ['_id', 'email'], then '/user/<_id>/<email>'"
169
165
  }
170
166
  },
171
- "required": [
172
- "endpoint"
173
- ]
167
+ "required": ["endpoint"]
168
+ },
169
+ "linkAfterAction": {
170
+ "type": "object",
171
+ "properties": {
172
+ "endpoint": {
173
+ "type": "string",
174
+ "description": "e.g.: '/user'"
175
+ },
176
+ "propertiesAsQueryParam": {
177
+ "type": "array",
178
+ "items": {
179
+ "type": "string"
180
+ },
181
+ "description": "if, for example, ['_id', 'email'], then '/user?_id=value&email=value'"
182
+ },
183
+ "propertiesAsPathParam": {
184
+ "type": "array",
185
+ "items": {
186
+ "type": "string"
187
+ },
188
+ "description": "if, for example, ['_id', 'email'], then '/user/<_id>/<email>'"
189
+ }
190
+ }
174
191
  },
175
192
  "request": {
176
193
  "type": "object",
@@ -195,12 +212,7 @@
195
212
  },
196
213
  "verb": {
197
214
  "type": "string",
198
- "enum": [
199
- "get",
200
- "post",
201
- "put",
202
- "softDelete"
203
- ]
215
+ "enum": ["get", "post", "put", "softDelete"]
204
216
  },
205
217
  "dialog": {
206
218
  "type": "object",
@@ -212,21 +224,12 @@
212
224
  "type": "string"
213
225
  }
214
226
  },
215
- "required": [
216
- "title",
217
- "message"
218
- ]
227
+ "required": ["title", "message"]
219
228
  }
220
229
  },
221
- "required": [
222
- "endpoint",
223
- "verb"
224
- ]
230
+ "required": ["endpoint", "verb"]
225
231
  }
226
- },
227
- "required": [
228
- "link"
229
- ]
232
+ }
230
233
  },
231
234
  "businessRules": {
232
235
  "$ref": "business-rules.ref.json"
@@ -238,11 +241,7 @@
238
241
  "type": "string"
239
242
  }
240
243
  },
241
- "required": [
242
- "icon",
243
- "label",
244
- "action"
245
- ]
244
+ "required": ["icon", "label", "action"]
246
245
  }
247
246
  },
248
247
  "listActions": {
@@ -325,7 +324,8 @@
325
324
  "enum": [
326
325
  "one-to-one",
327
326
  "one-to-many",
328
- "many-to-many"
327
+ "many-to-many",
328
+ "many-to-one"
329
329
  ]
330
330
  },
331
331
  "fields": {
@@ -340,10 +340,7 @@
340
340
  "$ref": "types-datatype.ref.json"
341
341
  }
342
342
  },
343
- "required": [
344
- "name",
345
- "dataType"
346
- ]
343
+ "required": ["name", "dataType"]
347
344
  }
348
345
  },
349
346
  "isHidden": {
@@ -405,10 +402,7 @@
405
402
  }
406
403
  }
407
404
  },
408
- "required": [
409
- "name",
410
- "dataType"
411
- ]
405
+ "required": ["name", "dataType"]
412
406
  }
413
407
  },
414
408
  "relatedEntity": {
@@ -434,10 +428,7 @@
434
428
  "type": "string"
435
429
  }
436
430
  },
437
- "required": [
438
- "fields",
439
- "contractId"
440
- ]
431
+ "required": ["fields", "contractId"]
441
432
  }
442
433
  }
443
434
  },
@@ -465,10 +456,7 @@
465
456
  }
466
457
  }
467
458
  },
468
- "required": [
469
- "entity",
470
- "fields"
471
- ]
459
+ "required": ["entity", "fields"]
472
460
  },
473
461
  "conditions": {
474
462
  "$ref": "condition.ref.json"
@@ -480,256 +468,13 @@
480
468
  "type": "string"
481
469
  }
482
470
  },
483
- "required": [
484
- "id",
485
- "endpoint",
486
- "actions"
487
- ]
471
+ "required": ["id", "endpoint", "actions"]
488
472
  }
489
473
  },
490
- "publicContracts?": {
474
+ "publicContracts": {
491
475
  "type": "array",
492
476
  "items": {
493
- "type": "object",
494
- "properties": {
495
- "id": {
496
- "type": "string"
497
- },
498
- "endpoint": {
499
- "type": "string"
500
- },
501
- "actions": {
502
- "type": "array",
503
- "items": {
504
- "type": "string",
505
- "enum": [
506
- "create",
507
- "get",
508
- "getById",
509
- "update",
510
- "softDelete",
511
- "hardDelete",
512
- "clone",
513
- "sendEmail"
514
- ]
515
- }
516
- },
517
- "permissionedUrls": {
518
- "type": "array",
519
- "items": {
520
- "type": "string"
521
- }
522
- },
523
- "request": {
524
- "type": "object",
525
- "properties": {
526
- "entity": {
527
- "type": "string"
528
- },
529
- "description": {
530
- "type": "string"
531
- },
532
- "fields": {
533
- "type": "array",
534
- "items": {
535
- "type": "object",
536
- "properties": {
537
- "name": {
538
- "type": "string"
539
- },
540
- "dataType": {
541
- "$ref": "types-datatype.ref.json"
542
- },
543
- "isRequired": {
544
- "type": "boolean"
545
- },
546
- "requiredOneOf": {
547
- "type": "array",
548
- "items": {
549
- "type": "string"
550
- }
551
- },
552
- "isHidden": {
553
- "type": "boolean",
554
- "description": "If true, the attribute will not be exposed in the API."
555
- },
556
- "foreignKey": {
557
- "type": "object",
558
- "properties": {
559
- "entity": {
560
- "type": "string"
561
- },
562
- "connectionAttribute": {
563
- "type": "string"
564
- },
565
- "relationship": {
566
- "type": "string",
567
- "enum": [
568
- "one-to-one",
569
- "one-to-many",
570
- "many-to-many"
571
- ]
572
- },
573
- "fields": {
574
- "type": "array",
575
- "items": {
576
- "type": "object",
577
- "properties": {
578
- "name": {
579
- "type": "string"
580
- },
581
- "dataType": {
582
- "$ref": "types-datatype.ref.json"
583
- }
584
- },
585
- "required": [
586
- "name",
587
- "dataType"
588
- ]
589
- }
590
- },
591
- "isHidden": {
592
- "type": "boolean",
593
- "description": "If true, the connection attribute will not be exposed in the API."
594
- }
595
- },
596
- "required": [
597
- "entity",
598
- "connectionAttribute",
599
- "relationship"
600
- ]
601
- },
602
- "isPrimaryKey": {
603
- "type": "boolean"
604
- },
605
- "minSize": {
606
- "type": "number"
607
- },
608
- "maxSize": {
609
- "type": "number"
610
- },
611
- "enum": {
612
- "type": "array",
613
- "items": {
614
- "oneOf": [
615
- {
616
- "type": "string"
617
- },
618
- {
619
- "type": "number"
620
- }
621
- ]
622
- }
623
- },
624
- "isUnique": {
625
- "type": "boolean"
626
- },
627
- "uniqueComposedFields": {
628
- "type": "array",
629
- "items": {
630
- "type": "string"
631
- }
632
- },
633
- "actionsExceptions": {
634
- "type": "array",
635
- "items": {
636
- "type": "string",
637
- "enum": [
638
- "create",
639
- "get",
640
- "getById",
641
- "update",
642
- "softDelete",
643
- "hardDelete",
644
- "clone",
645
- "sendEmail"
646
- ]
647
- }
648
- },
649
- "businessRules": {
650
- "$ref": "business-rules.ref.json"
651
- }
652
- },
653
- "required": [
654
- "name",
655
- "dataType"
656
- ]
657
- }
658
- },
659
- "relatedEntity": {
660
- "type": "object",
661
- "properties": {
662
- "entity": {
663
- "type": "string",
664
- "description": "An attribute called 'relatedEntity' will be created in the main entity to refer to an entity that will be related to the main one."
665
- },
666
- "connectionAttribute": {
667
- "type": "string",
668
- "description": "An attribute called 'relatedEntityId' will be created in the main entity to set the value of the id over 'relatedEntity' to make the connection."
669
- },
670
- "fieldsFromEntity": {
671
- "type": "array",
672
- "items": {
673
- "type": "object",
674
- "properties": {
675
- "fields": {
676
- "$ref": "form.ref.json"
677
- },
678
- "contractId": {
679
- "type": "string"
680
- }
681
- }
682
- },
683
- "required": [
684
- "fields",
685
- "contractId"
686
- ]
687
- }
688
- },
689
- "required": [
690
- "entity",
691
- "connectionAttribute",
692
- "fieldsFromEntity"
693
- ]
694
- },
695
- "uniqueConstraints": {
696
- "type": "array",
697
- "items": {
698
- "type": "object",
699
- "properties": {
700
- "name": {
701
- "type": "string"
702
- },
703
- "fields": {
704
- "type": "array",
705
- "items": {
706
- "type": "string"
707
- }
708
- }
709
- }
710
- }
711
- }
712
- },
713
- "required": [
714
- "entity",
715
- "fields"
716
- ]
717
- },
718
- "conditions": {
719
- "$ref": "condition.ref.json"
720
- },
721
- "businessRules": {
722
- "$ref": "business-rules.ref.json"
723
- },
724
- "userStory": {
725
- "type": "string"
726
- }
727
- },
728
- "required": [
729
- "id",
730
- "endpoint",
731
- "actions"
732
- ]
477
+ "$ref": "form-public-contract.ref.json"
733
478
  }
734
479
  },
735
480
  "archive": {
@@ -745,26 +490,33 @@
745
490
  },
746
491
  "logicalOperator": {
747
492
  "type": "string",
748
- "enum": [
749
- "&&",
750
- "!",
751
- "nor",
752
- "||"
753
- ]
493
+ "enum": ["&&", "!", "nor", "||"]
494
+ }
495
+ },
496
+ "required": ["property", "value"]
497
+ }
498
+ },
499
+ "pagination": {
500
+ "type": "object",
501
+ "properties": {
502
+ "enabled": {
503
+ "type": "boolean"
504
+ },
505
+ "pageSize": {
506
+ "type": "number"
507
+ },
508
+ "pageSizeOptions": {
509
+ "type": "array",
510
+ "items": {
511
+ "type": "number"
754
512
  }
755
513
  },
756
- "required": [
757
- "property",
758
- "value"
759
- ]
514
+ "position": {
515
+ "type": "string",
516
+ "enum": ["top", "bottom", "both"]
517
+ }
760
518
  }
761
519
  }
762
520
  },
763
- "required": [
764
- "componentType",
765
- "id",
766
- "title",
767
- "dataSource",
768
- "contracts"
769
- ]
770
- }
521
+ "required": ["componentType", "id", "title", "dataSource", "contracts"]
522
+ }
@@ -41,6 +41,9 @@
41
41
  },
42
42
  {
43
43
  "$ref": "panel.ref.json"
44
+ },
45
+ {
46
+ "$ref": "kanban.ref.json"
44
47
  }
45
48
  ]
46
49
  }
@@ -0,0 +1,20 @@
1
+ {
2
+ "$id": "notification-condition.ref.json",
3
+ "type": "object",
4
+ "properties": {
5
+ "field": {
6
+ "type": "string"
7
+ },
8
+ "value": {
9
+ "type": "string"
10
+ },
11
+ "comparisonOperator": {
12
+ "enum": ["===", ">", ">=", "in", "<", "<=", "!==", "nin"]
13
+ },
14
+ "logicalOperator": {
15
+ "enum": ["&&", "!", "nor", "||"]
16
+ }
17
+ },
18
+ "required": ["field", "value", "comparisonOperator"],
19
+ "additionalProperties": false
20
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "$id": "notification-recipients.ref.json",
3
+ "oneOf": [
4
+ {
5
+ "const": "allUsers"
6
+ },
7
+ {
8
+ "type": "object",
9
+ "properties": {
10
+ "field": {
11
+ "type": "string"
12
+ },
13
+ "property": {
14
+ "type": "string"
15
+ }
16
+ },
17
+ "required": ["field"],
18
+ "additionalProperties": false
19
+ },
20
+ {
21
+ "type": "object",
22
+ "properties": {
23
+ "role": {
24
+ "type": "string"
25
+ }
26
+ },
27
+ "required": ["role"],
28
+ "additionalProperties": false
29
+ }
30
+ ]
31
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "$id": "notification.ref.json",
3
+ "type": "object",
4
+ "properties": {
5
+ "id": {
6
+ "type": "string"
7
+ },
8
+ "title": {
9
+ "type": "string"
10
+ },
11
+ "message": {
12
+ "type": "string"
13
+ },
14
+ "source": {
15
+ "type": "object",
16
+ "properties": {
17
+ "type": {
18
+ "enum": ["internal", "external"]
19
+ },
20
+ "internal": {
21
+ "type": "object",
22
+ "properties": {
23
+ "contractId": {
24
+ "type": "string"
25
+ }
26
+ },
27
+ "required": ["contractId"],
28
+ "additionalProperties": false
29
+ },
30
+ "external": {
31
+ "type": "object",
32
+ "properties": {
33
+ "endpoint": {
34
+ "type": "string"
35
+ }
36
+ },
37
+ "required": ["endpoint"],
38
+ "additionalProperties": false
39
+ }
40
+ },
41
+ "required": ["type"],
42
+ "additionalProperties": false
43
+ },
44
+ "condition": {
45
+ "type": "array",
46
+ "items": {
47
+ "$ref": "notification-condition.ref.json"
48
+ }
49
+ },
50
+ "recipients": {
51
+ "$ref": "notification-recipients.ref.json"
52
+ },
53
+ "removeAfterWatch": {
54
+ "type": "boolean"
55
+ },
56
+ "isFromUser": {
57
+ "type": "boolean"
58
+ },
59
+ "isWebhook": {
60
+ "type": "boolean"
61
+ }
62
+ },
63
+ "required": ["id", "title", "message", "source", "condition", "recipients"],
64
+ "additionalProperties": false
65
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "$id": "project-repositories.ref.json",
3
+ "type": "object",
4
+ "properties": {
5
+ "frontend": {
6
+ "type": "string",
7
+ "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$"
8
+ },
9
+ "backend": {
10
+ "type": "string",
11
+ "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$"
12
+ },
13
+ "aiAgent": {
14
+ "type": "string",
15
+ "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$"
16
+ }
17
+ },
18
+ "additionalProperties": false
19
+ }
@@ -6,23 +6,39 @@
6
6
  "themeName": {
7
7
  "type": "string"
8
8
  },
9
- "overall": {
10
- "$ref": "project-style-theme.ref.json"
9
+ "colors": {
10
+ "type": "object",
11
+ "properties": {
12
+ "primary": { "type": "string" },
13
+ "primaryContrast": { "type": "string" },
14
+ "secondary": { "type": "string" },
15
+ "secondaryContrast": { "type": "string" },
16
+ "background": { "type": "string" },
17
+ "error": { "type": "string" },
18
+ "success": { "type": "string" }
19
+ }
11
20
  },
12
- "main": {
13
- "$ref": "project-style-theme.ref.json"
21
+ "borders": {
22
+ "type": "object",
23
+ "properties": {
24
+ "borderRadius": { "type": "string" }
25
+ }
14
26
  },
15
- "navBar": {
16
- "$ref": "project-style-theme.ref.json"
27
+ "typography": {
28
+ "type": "object",
29
+ "properties": {
30
+ "fontFamily": { "type": "string" },
31
+ "fontSize": { "type": "string" }
32
+ }
17
33
  },
18
- "sideBar": {
19
- "$ref": "project-style-theme.ref.json"
20
- },
21
- "footer": {
22
- "$ref": "project-style-theme.ref.json"
34
+ "shadows": {
35
+ "type": "object",
36
+ "properties": {
37
+ "boxShadow": { "type": "string" }
38
+ }
23
39
  }
24
40
  },
25
41
  "required": [
26
42
  "themeName"
27
43
  ]
28
- }
44
+ }