rapida-partner 1.4.0 → 1.5.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/package.json +1 -1
- package/src/examples/projects/movieBackoffice.ts +0 -6
- package/src/interfaces/form.interface.ts +3 -0
- package/src/schemas/form.ref.json +39 -5
- package/src/examples/components/forms/company.form.ts +0 -658
- package/src/examples/components/forms/customer.form.ts +0 -120
- package/src/examples/components/forms/person.form.ts +0 -479
- package/src/examples/modules/company.ts +0 -13
- package/src/examples/modules/customer.ts +0 -13
- package/src/examples/modules/person.ts +0 -13
package/package.json
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import type { IProject } from "../../interfaces/project.interface";
|
|
2
2
|
import { characterModule } from "../modules/character";
|
|
3
|
-
import { companyModule } from "../modules/company";
|
|
4
|
-
import { customerModule } from "../modules/customer";
|
|
5
3
|
import { movieModule } from "../modules/movie";
|
|
6
|
-
import { personModule } from "../modules/person";
|
|
7
4
|
|
|
8
5
|
export const movieBackoffice: IProject = {
|
|
9
6
|
id: "movieBackoffice",
|
|
@@ -61,9 +58,6 @@ export const movieBackoffice: IProject = {
|
|
|
61
58
|
baseUrl: "http://localhost:5173",
|
|
62
59
|
},
|
|
63
60
|
modules: [
|
|
64
|
-
customerModule,
|
|
65
|
-
personModule,
|
|
66
|
-
companyModule,
|
|
67
61
|
movieModule,
|
|
68
62
|
characterModule,
|
|
69
63
|
],
|
|
@@ -28,6 +28,8 @@ export interface IForm {
|
|
|
28
28
|
actions: ("create" | "get" | "getById" | "update" | "delete" | "clone")[];
|
|
29
29
|
request?: IContractRequest;
|
|
30
30
|
conditions?: IFormCondition[];
|
|
31
|
+
businessRules?: IBusinessRule[];
|
|
32
|
+
userStory?: string;
|
|
31
33
|
}[];
|
|
32
34
|
kanban?: {
|
|
33
35
|
status: "toDo" | "inProgress" | "done";
|
|
@@ -77,6 +79,7 @@ interface IContractRequestFieldForeignKey {
|
|
|
77
79
|
entity: string;
|
|
78
80
|
connectionAttribute: string;
|
|
79
81
|
relationship: "many-to-many" | "one-to-many" | "one-to-one"
|
|
82
|
+
fields?: IContractRequestField[];
|
|
80
83
|
}
|
|
81
84
|
|
|
82
85
|
// interface IFormContractArray {
|
|
@@ -81,6 +81,21 @@
|
|
|
81
81
|
"relationship": {
|
|
82
82
|
"type": "string",
|
|
83
83
|
"enum": ["one-to-one", "one-to-many", "many-to-many"]
|
|
84
|
+
},
|
|
85
|
+
"fields": {
|
|
86
|
+
"type": "array",
|
|
87
|
+
"items": {
|
|
88
|
+
"type": "object",
|
|
89
|
+
"properties": {
|
|
90
|
+
"name": {
|
|
91
|
+
"type": "string"
|
|
92
|
+
},
|
|
93
|
+
"dataType": {
|
|
94
|
+
"$ref": "types-datatype.ref.json"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"required": ["name", "dataType"]
|
|
98
|
+
}
|
|
84
99
|
}
|
|
85
100
|
},
|
|
86
101
|
"required": [
|
|
@@ -117,7 +132,14 @@
|
|
|
117
132
|
"type": "array",
|
|
118
133
|
"items": {
|
|
119
134
|
"type": "string",
|
|
120
|
-
"enum": [
|
|
135
|
+
"enum": [
|
|
136
|
+
"create",
|
|
137
|
+
"get",
|
|
138
|
+
"getById",
|
|
139
|
+
"update",
|
|
140
|
+
"delete",
|
|
141
|
+
"clone"
|
|
142
|
+
]
|
|
121
143
|
}
|
|
122
144
|
}
|
|
123
145
|
},
|
|
@@ -128,10 +150,12 @@
|
|
|
128
150
|
"type": "object",
|
|
129
151
|
"properties": {
|
|
130
152
|
"entity": {
|
|
131
|
-
"type": "string"
|
|
153
|
+
"type": "string",
|
|
154
|
+
"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."
|
|
132
155
|
},
|
|
133
156
|
"connectionAttribute": {
|
|
134
|
-
"type": "string"
|
|
157
|
+
"type": "string",
|
|
158
|
+
"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."
|
|
135
159
|
},
|
|
136
160
|
"fieldsFromEntity": {
|
|
137
161
|
"type": "array",
|
|
@@ -141,7 +165,7 @@
|
|
|
141
165
|
"fields": {
|
|
142
166
|
"$ref": "form.ref.json"
|
|
143
167
|
},
|
|
144
|
-
"contractId":{
|
|
168
|
+
"contractId": {
|
|
145
169
|
"type": "string"
|
|
146
170
|
}
|
|
147
171
|
}
|
|
@@ -149,13 +173,23 @@
|
|
|
149
173
|
"required": ["fields", "contractId"]
|
|
150
174
|
}
|
|
151
175
|
},
|
|
152
|
-
"required": [
|
|
176
|
+
"required": [
|
|
177
|
+
"entity",
|
|
178
|
+
"connectionAttribute",
|
|
179
|
+
"fieldsFromEntity"
|
|
180
|
+
]
|
|
153
181
|
}
|
|
154
182
|
},
|
|
155
183
|
"required": ["entity", "fields"]
|
|
156
184
|
},
|
|
157
185
|
"conditions": {
|
|
158
186
|
"$ref": "condition.ref.json"
|
|
187
|
+
},
|
|
188
|
+
"businessRules": {
|
|
189
|
+
"$ref": "business-rules.ref.json"
|
|
190
|
+
},
|
|
191
|
+
"userStory": {
|
|
192
|
+
"type": "string"
|
|
159
193
|
}
|
|
160
194
|
},
|
|
161
195
|
"required": ["id", "endpoint", "actions"]
|