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.
Files changed (107) hide show
  1. package/README.md +85 -0
  2. package/index.ts +13 -0
  3. package/package.json +27 -0
  4. package/rapidaObject.json +3024 -0
  5. package/src/constants/options/agendaStatus.ts +3 -0
  6. package/src/constants/options/citiesFromBrazil.ts +27852 -0
  7. package/src/constants/options/countriesFromEarth.ts +1761 -0
  8. package/src/constants/options/currencies.ts +142 -0
  9. package/src/constants/options/eventJobs.ts +94 -0
  10. package/src/constants/options/events.ts +22 -0
  11. package/src/constants/options/hours.ts +26 -0
  12. package/src/constants/options/languages.ts +34 -0
  13. package/src/constants/options/statesFromBrazil.ts +29 -0
  14. package/src/controllers/ts_project_to_json_project.ts +17 -0
  15. package/src/controllers/validate-project-json-schema.ts +11 -0
  16. package/src/examples/components/forms/character.form.ts +92 -0
  17. package/src/examples/components/forms/company.form.ts +648 -0
  18. package/src/examples/components/forms/movie.form.ts +205 -0
  19. package/src/examples/components/forms/movieGenre.form.ts +43 -0
  20. package/src/examples/components/forms/person.form.ts +474 -0
  21. package/src/examples/components/lists/character.list.ts +47 -0
  22. package/src/examples/components/lists/company.list.ts +49 -0
  23. package/src/examples/components/lists/movie.list.ts +60 -0
  24. package/src/examples/components/lists/movieGenre.list.ts +51 -0
  25. package/src/examples/components/lists/person.list.ts +50 -0
  26. package/src/examples/modules/character.ts +13 -0
  27. package/src/examples/modules/company.ts +13 -0
  28. package/src/examples/modules/movie.ts +17 -0
  29. package/src/examples/modules/person.ts +13 -0
  30. package/src/examples/projects/movieBackoffice.ts +110 -0
  31. package/src/interfaces/backend-framework-structure.interface.ts +44 -0
  32. package/src/interfaces/data-card.interface.ts +102 -0
  33. package/src/interfaces/data-chart.interface.ts +84 -0
  34. package/src/interfaces/data-detail.interface.ts +123 -0
  35. package/src/interfaces/data-grid.interface.ts +48 -0
  36. package/src/interfaces/data-table.interface.ts +84 -0
  37. package/src/interfaces/form-array.interface.ts +14 -0
  38. package/src/interfaces/form-autocomplete.interface.ts +79 -0
  39. package/src/interfaces/form-button.interface.ts +34 -0
  40. package/src/interfaces/form-condition.interface.ts +26 -0
  41. package/src/interfaces/form-datepicker.interface.ts +18 -0
  42. package/src/interfaces/form-fieldset.interface.ts +13 -0
  43. package/src/interfaces/form-file.interface.ts +57 -0
  44. package/src/interfaces/form-input.interface.ts +69 -0
  45. package/src/interfaces/form-numeric.interface.ts +22 -0
  46. package/src/interfaces/form-pattern.interface.ts +16 -0
  47. package/src/interfaces/form-radiogroup.interface.ts +21 -0
  48. package/src/interfaces/form-select.interface.ts +60 -0
  49. package/src/interfaces/form-switch.interface.ts +15 -0
  50. package/src/interfaces/form-tab.interface.ts +17 -0
  51. package/src/interfaces/form.interface.ts +73 -0
  52. package/src/interfaces/frontend-framework-structure.interface.ts +39 -0
  53. package/src/interfaces/layout-dashboard.interface.ts +52 -0
  54. package/src/interfaces/layout-panel.interface.ts +45 -0
  55. package/src/interfaces/list.interface.ts +50 -0
  56. package/src/interfaces/project-backend.interface.ts +48 -0
  57. package/src/interfaces/project-style.interface.ts +129 -0
  58. package/src/interfaces/project.interface.ts +79 -0
  59. package/src/interfaces/yaml-template-skeleton.interface.ts +35 -0
  60. package/src/schemas/backend-framework-structure.schema.json +194 -0
  61. package/src/schemas/backend.ref.json +77 -0
  62. package/src/schemas/bdd-and-e2e-narratives.ref.json +57 -0
  63. package/src/schemas/bdd-and-e2e.json +36 -0
  64. package/src/schemas/business-plan.ref.json +25 -0
  65. package/src/schemas/business-rules.ref.json +34 -0
  66. package/src/schemas/component-one-of.ref.json +15 -0
  67. package/src/schemas/dashboard.ref.json +111 -0
  68. package/src/schemas/data-card.ref.json +245 -0
  69. package/src/schemas/data-chart.ref.json +168 -0
  70. package/src/schemas/data-detail.ref.json +297 -0
  71. package/src/schemas/data-grid.ref.json +101 -0
  72. package/src/schemas/data-table.ref.json +181 -0
  73. package/src/schemas/external-application.ref.json +97 -0
  74. package/src/schemas/form-array.ref.json +35 -0
  75. package/src/schemas/form-autocomplete-options-api.ref.json +53 -0
  76. package/src/schemas/form-autocomplete.ref.json +204 -0
  77. package/src/schemas/form-button.ref.json +88 -0
  78. package/src/schemas/form-common-api-request.ref.json +29 -0
  79. package/src/schemas/form-common-filters-from-other-form-fields.ref.json +22 -0
  80. package/src/schemas/form-common-form-fields-filled-by-api-response.ref.json +28 -0
  81. package/src/schemas/form-condition.ref.json +70 -0
  82. package/src/schemas/form-datepicker.ref.json +50 -0
  83. package/src/schemas/form-fieldset.ref.json +28 -0
  84. package/src/schemas/form-file.ref.json +115 -0
  85. package/src/schemas/form-input.ref.json +105 -0
  86. package/src/schemas/form-numeric.ref.json +60 -0
  87. package/src/schemas/form-one-of.ref.json +22 -0
  88. package/src/schemas/form-pattern.ref.json +42 -0
  89. package/src/schemas/form-radiogroup.ref.json +64 -0
  90. package/src/schemas/form-select.ref.json +123 -0
  91. package/src/schemas/form-switch.ref.json +39 -0
  92. package/src/schemas/form-tab.ref.json +50 -0
  93. package/src/schemas/form.ref.json +107 -0
  94. package/src/schemas/frontend-framework-structure.schema.json +178 -0
  95. package/src/schemas/frontend.ref.json +30 -0
  96. package/src/schemas/list.ref.json +196 -0
  97. package/src/schemas/module.ref.json +39 -0
  98. package/src/schemas/panel.ref.json +127 -0
  99. package/src/schemas/project.schema.json +39 -0
  100. package/src/schemas/todo.ref.json +10 -0
  101. package/src/utils/email.ts +56 -0
  102. package/src/utils/env.ts +9 -0
  103. package/src/utils/file.ts +139 -0
  104. package/src/utils/json.ts +100 -0
  105. package/src/utils/path.ts +51 -0
  106. package/src/utils/rapida-project.ts +17 -0
  107. package/tsconfig.json +27 -0
@@ -0,0 +1,123 @@
1
+ {
2
+ "$id": "form-select.ref.json",
3
+ "type": "object",
4
+ "properties": {
5
+ "type": {
6
+ "const": "select"
7
+ },
8
+ "name": {
9
+ "type": "string"
10
+ },
11
+ "dataType": {
12
+ "type": "string",
13
+ "enum": [
14
+ "text",
15
+ "number",
16
+ "password",
17
+ "email",
18
+ "color",
19
+ "date",
20
+ "file",
21
+ "array",
22
+ "char",
23
+ "nchar",
24
+ "varchar",
25
+ "varchar2",
26
+ "nvarchar",
27
+ "longtext",
28
+ "clob",
29
+ "nclob",
30
+ "decimal",
31
+ "numeric",
32
+ "integer",
33
+ "float",
34
+ "double",
35
+ "real",
36
+ "timestamp",
37
+ "datetime",
38
+ "datetime2",
39
+ "uniqueidentifier",
40
+ "boolean"
41
+ ]
42
+ },
43
+ "label": {
44
+ "type": "string"
45
+ },
46
+ "placeholder": {
47
+ "type": "string"
48
+ },
49
+ "tooltip": {
50
+ "type": "string"
51
+ },
52
+ "isAutofocus": {
53
+ "type": "boolean"
54
+ },
55
+ "isDisabled": {
56
+ "type": "boolean"
57
+ },
58
+ "isDisabledOnUpdate": {
59
+ "type": "boolean"
60
+ },
61
+ "isRequired": {
62
+ "type": "boolean"
63
+ },
64
+ "isUnique": {
65
+ "type": "boolean"
66
+ },
67
+ "conditions": {
68
+ "$ref": "form-condition.ref.json"
69
+ },
70
+ "validators": {
71
+ "type": "array",
72
+ "items": {
73
+ "type": "string",
74
+ "enum": ["cpf", "cnpj"]
75
+ }
76
+ },
77
+ "todo": {
78
+ "type": "string"
79
+ },
80
+ "businessRules": {
81
+ "$ref": "business-rules.ref.json"
82
+ },
83
+ "isMultiple": {
84
+ "type": "boolean"
85
+ },
86
+ "options": {
87
+ "type": "array",
88
+ "items": {
89
+ "type": "object",
90
+ "properties": {
91
+ "label": {
92
+ "type": "string"
93
+ },
94
+ "value": {
95
+ "oneOf": [
96
+ {
97
+ "type": "string"
98
+ },
99
+ {
100
+ "type": "number"
101
+ },
102
+ {
103
+ "type": "boolean"
104
+ }
105
+ ]
106
+ },
107
+ "isDisabled": {
108
+ "type": "boolean"
109
+ },
110
+ "isSelected": {
111
+ "type": "boolean"
112
+ }
113
+ },
114
+ "required": ["label", "value"]
115
+ }
116
+ },
117
+ "optionsApi": {
118
+ "$ref": "form-autocomplete-options-api.ref.json"
119
+ }
120
+ },
121
+ "required": ["type", "dataType", "name", "label"],
122
+ "oneOf": [{ "required": ["options"] }, { "required": ["optionsApi"] }]
123
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "$id": "form-switch.ref.json",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "type": "object",
5
+ "properties": {
6
+ "type": {
7
+ "type": "string",
8
+ "const": "switch"
9
+ },
10
+ "name": {
11
+ "type": "string"
12
+ },
13
+ "label": {
14
+ "type": "string"
15
+ },
16
+ "tooltip": {
17
+ "type": "string"
18
+ },
19
+ "isDisabled": {
20
+ "type": "boolean"
21
+ },
22
+ "isDisabledOnUpdate": {
23
+ "type": "boolean"
24
+ },
25
+ "isRequired": {
26
+ "type": "boolean"
27
+ },
28
+ "conditions": {
29
+ "$ref": "form-condition.ref.json"
30
+ },
31
+ "businessRules": {
32
+ "$ref": "business-rules.ref.json"
33
+ },
34
+ "todo": {
35
+ "type": "string"
36
+ }
37
+ },
38
+ "required": ["type", "name", "label"]
39
+ }
@@ -0,0 +1,50 @@
1
+ {
2
+ "$id": "form-tab.ref.json",
3
+ "type":"object",
4
+ "properties": {
5
+ "type": {
6
+ "const": "tab"
7
+ },
8
+ "id": {
9
+ "type":"string"
10
+ },
11
+ "todo": {
12
+ "type":"string"
13
+ },
14
+ "businessRules": {
15
+ "$ref": "business-rules.ref.json"
16
+ },
17
+ "tabs": {
18
+ "type": "array",
19
+ "items": {
20
+ "type": "object",
21
+ "properties": {
22
+ "id": {
23
+ "type":"string"
24
+ },
25
+ "title": {
26
+ "type":"string"
27
+ },
28
+ "elements": {
29
+ "$ref": "form-one-of.ref.json"
30
+ },
31
+ "conditions": {
32
+ "$ref": "form-condition.ref.json"
33
+ }
34
+ },
35
+ "required": [
36
+ "id",
37
+ "title",
38
+ "elements"
39
+ ]
40
+ }
41
+ },
42
+ "conditions": {
43
+ "$ref": "form-condition.ref.json"
44
+ }
45
+ },
46
+ "required": [
47
+ "type",
48
+ "id"
49
+ ]
50
+ }
@@ -0,0 +1,107 @@
1
+ {
2
+ "$id": "form.ref.json",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "type": "object",
5
+ "properties": {
6
+ "componentType": {
7
+ "const": "form"
8
+ },
9
+ "id": {
10
+ "type": "string"
11
+ },
12
+ "title": {
13
+ "type": "string"
14
+ },
15
+ "icon": {
16
+ "type": "string"
17
+ },
18
+ "guards": {
19
+ "type": "string",
20
+ "enum": ["isAuthenticated", "isAuthorized"]
21
+ },
22
+ "businessRules": {
23
+ "$ref": "business-rules.ref.json"
24
+ },
25
+ "elements": {
26
+ "$ref": "form-one-of.ref.json"
27
+ },
28
+ "userStory": {
29
+ "type": "string"
30
+ },
31
+ "contracts": {
32
+ "type": "array",
33
+ "items": {
34
+ "type": "object",
35
+ "properties": {
36
+ "endpoint": {
37
+ "type": "string"
38
+ },
39
+ "methods": {
40
+ "type": "array",
41
+ "items": {
42
+ "type": "object",
43
+ "properties": {
44
+ "verb": {
45
+ "type": "string",
46
+ "enum": ["GET", "POST", "PUT", "DELETE", "PATCH"]
47
+ }
48
+ }
49
+ }
50
+ },
51
+ "request": {
52
+ "type": "object",
53
+ "properties": {
54
+ "body": {
55
+ "type": "array",
56
+ "items": {
57
+ "type": "object",
58
+ "properties": {
59
+ "name": {
60
+ "type": "string"
61
+ },
62
+ "dataType": {
63
+ "type": "string",
64
+ "enum": [
65
+ "text",
66
+ "number",
67
+ "password",
68
+ "email",
69
+ "color",
70
+ "date",
71
+ "time",
72
+ "wysiwyg",
73
+ "file",
74
+ "array",
75
+ "char",
76
+ "nchar",
77
+ "varchar",
78
+ "varchar2",
79
+ "nvarchar",
80
+ "longtext",
81
+ "clob",
82
+ "nclob",
83
+ "decimal",
84
+ "numeric",
85
+ "integer",
86
+ "float",
87
+ "double",
88
+ "real",
89
+ "timestamp",
90
+ "datetime",
91
+ "datetime2",
92
+ "uniqueidentifier",
93
+ "boolean"
94
+ ]
95
+ }
96
+ }
97
+ }
98
+ }
99
+ }
100
+ }
101
+ },
102
+ "required": ["endpoint", "methods"]
103
+ }
104
+ }
105
+ },
106
+ "required": ["componentType", "id", "title", "elements", "contracts"]
107
+ }
@@ -0,0 +1,178 @@
1
+ {
2
+ "$id": "framework-structure-vue.json",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "type": "object",
5
+ "properties": {
6
+ "projectFolderCase": {
7
+ "type": "string",
8
+ "enum": ["kebab", "snake", "pascal", "camel"]
9
+ },
10
+ "moduleFolder": {
11
+ "type": "object",
12
+ "properties": {
13
+ "case": {
14
+ "type": "string",
15
+ "enum": ["kebab", "snake", "pascal", "camel"]
16
+ },
17
+ "folderBasePath": {
18
+ "type": "string"
19
+ },
20
+ "hasFolderWithItsName": {
21
+ "type": "boolean"
22
+ }
23
+ },
24
+ "required": ["case", "folderBasePath"]
25
+ },
26
+ "componentFolder": {
27
+ "$comment": "IF NOT defined THEN it will be implied that componets are nested to module folders.",
28
+ "type": "object",
29
+ "properties": {
30
+ "case": {
31
+ "type": "string",
32
+ "enum": ["kebab", "snake", "pascal", "camel"]
33
+ },
34
+ "folderBasePath": {
35
+ "type": "string"
36
+ },
37
+ "hasFolderWithItsName": {
38
+ "type": "boolean"
39
+ }
40
+ },
41
+ "required": ["case", "folderBasePath", "hasFolderWithItsName"]
42
+ },
43
+ "moduleFile": {
44
+ "type": "object",
45
+ "properties": {
46
+ "case": {
47
+ "type": "string",
48
+ "enum": ["kebab", "snake", "pascal", "camel"]
49
+ },
50
+ "folderBasePath": {
51
+ "type": "string"
52
+ },
53
+ "fileExtension": {
54
+ "type": "string"
55
+ },
56
+ "keyword": {
57
+ "type": "string"
58
+ }
59
+ },
60
+ "required": ["case", "fileExtension"]
61
+ },
62
+ "componentFile": {
63
+ "type": "object",
64
+ "properties": {
65
+ "case": {
66
+ "type": "string",
67
+ "enum": ["kebab", "snake", "pascal", "camel"]
68
+ },
69
+ "folderBasePath": {
70
+ "type": "string"
71
+ },
72
+ "fileExtension": {
73
+ "type": "string"
74
+ },
75
+ "keyword": {
76
+ "type": "string"
77
+ }
78
+ },
79
+ "required": ["case", "fileExtension"]
80
+ },
81
+ "templateFile": {
82
+ "type": "object",
83
+ "properties": {
84
+ "case": {
85
+ "type": "string",
86
+ "enum": ["kebab", "snake", "pascal", "camel"]
87
+ },
88
+ "folderBasePath": {
89
+ "type": "string"
90
+ },
91
+ "fileExtension": {
92
+ "type": "string"
93
+ },
94
+ "keyword": {
95
+ "type": "string"
96
+ }
97
+ },
98
+ "required": ["case", "fileExtension"]
99
+ },
100
+ "controllerFile": {
101
+ "type": "object",
102
+ "properties": {
103
+ "case": {
104
+ "type": "string",
105
+ "enum": ["kebab", "snake", "pascal", "camel"]
106
+ },
107
+ "folderBasePath": {
108
+ "type": "string"
109
+ },
110
+ "fileExtension": {
111
+ "type": "string"
112
+ },
113
+ "keyword": {
114
+ "type": "string"
115
+ }
116
+ },
117
+ "required": ["case", "fileExtension"]
118
+ },
119
+ "serviceFile": {
120
+ "type": "object",
121
+ "properties": {
122
+ "case": {
123
+ "type": "string",
124
+ "enum": ["kebab", "snake", "pascal", "camel"]
125
+ },
126
+ "folderBasePath": {
127
+ "type": "string"
128
+ },
129
+ "fileExtension": {
130
+ "type": "string"
131
+ },
132
+ "keyword": {
133
+ "type": "string"
134
+ }
135
+ },
136
+ "required": ["case", "fileExtension"]
137
+ },
138
+ "styleFile": {
139
+ "type": "object",
140
+ "properties": {
141
+ "case": {
142
+ "type": "string",
143
+ "enum": ["kebab", "snake", "pascal", "camel"]
144
+ },
145
+ "folderBasePath": {
146
+ "type": "string"
147
+ },
148
+ "fileExtension": {
149
+ "type": "string"
150
+ },
151
+ "keyword": {
152
+ "type": "string"
153
+ }
154
+ },
155
+ "required": ["case", "fileExtension"]
156
+ },
157
+ "dependencies": {
158
+ "type": "object",
159
+ "description": "Dependencies according to components elements",
160
+ "properties": {
161
+ "array": {
162
+ "type": "string"
163
+ },
164
+ "autocomplete": {
165
+ "type": "string"
166
+ },
167
+ "wysiwyg": {
168
+ "type": "string"
169
+ }
170
+ }
171
+ }
172
+ },
173
+ "required": [
174
+ "projectFolderCase",
175
+ "componentFile",
176
+ "moduleFile"
177
+ ]
178
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "$id": "frontend.ref.json",
3
+ "type": "object",
4
+ "properties": {
5
+ "framework": {
6
+ "type": "string",
7
+ "enum": [
8
+ "angular",
9
+ "flutter",
10
+ "react",
11
+ "reactnative",
12
+ "svelte",
13
+ "vue"
14
+ ]
15
+ },
16
+ "uiKit": {
17
+ "type": "string",
18
+ "enum": [
19
+ "antdesign",
20
+ "bootstrap",
21
+ "material",
22
+ "flowbite"
23
+ ]
24
+ }
25
+ },
26
+ "required": [
27
+ "framework",
28
+ "uiKit"
29
+ ]
30
+ }