rapida-partner 1.7.7 → 1.9.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 +1 -1
- package/src/interfaces/form-array.interface.ts +1 -0
- package/src/interfaces/form-inheritance.interface.ts +1 -0
- package/src/interfaces/form.interface.ts +2 -2
- package/src/interfaces/list.interface.ts +12 -0
- package/src/interfaces/project.interface.ts +7 -6
- package/src/schemas/form-array.ref.json +3 -0
- package/src/schemas/form-inheritance.ref.json +4 -0
- package/src/schemas/form.ref.json +3 -2
- package/src/schemas/list.ref.json +227 -2
- package/src/schemas/project.schema.json +7 -6
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@ export const movieBackoffice: IProject = {
|
|
|
9
9
|
id: "movieBackoffice",
|
|
10
10
|
title: "Movie Backoffice",
|
|
11
11
|
description: "Sistema de gerenciamento para filmes e personagens.",
|
|
12
|
-
flow: "
|
|
12
|
+
flow: "backofficeOpenedAndPermissionsByComponent",
|
|
13
13
|
businessPlan: {
|
|
14
14
|
businessValue: "Gerenciar e otimizar as operações do Movie.",
|
|
15
15
|
targetMarket: "Empresas que utilizam o Movie para gerenciar sugestões e feedbacks.",
|
|
@@ -24,7 +24,7 @@ export interface IForm {
|
|
|
24
24
|
contracts: {
|
|
25
25
|
id: string;
|
|
26
26
|
endpoint: string;
|
|
27
|
-
actions: ("create" | "get" | "getById" | "update" | "delete" | "clone")[];
|
|
27
|
+
actions: ("create" | "get" | "getById" | "update" | "delete" | "clone" | "sendEmail")[];
|
|
28
28
|
request?: IContractRequest;
|
|
29
29
|
conditions?: IFormCondition[];
|
|
30
30
|
businessRules?: IBusinessRule[];
|
|
@@ -41,7 +41,7 @@ export interface IForm {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
interface IContractRequest {
|
|
44
|
+
export interface IContractRequest {
|
|
45
45
|
entity: string,
|
|
46
46
|
relatedEntity?: {
|
|
47
47
|
entity: string;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type { EDataType } from "../enums/form.enum";
|
|
1
2
|
import type { IFormCondition } from "./condition.interface";
|
|
2
3
|
import type { IApiRequest } from "./form-input.interface";
|
|
4
|
+
import type { IContractRequest } from "./form.interface";
|
|
3
5
|
import type { IBusinessRule } from "./project.interface";
|
|
4
6
|
|
|
5
7
|
export interface IList {
|
|
@@ -21,6 +23,7 @@ export interface IList {
|
|
|
21
23
|
link: string; // e.g.: "/user"
|
|
22
24
|
usePropertyAsQuery?: boolean; // if true then "/user/<email>"
|
|
23
25
|
};
|
|
26
|
+
dataType: EDataType;
|
|
24
27
|
conditions?: IFormCondition[];
|
|
25
28
|
}[]; // properties taken from dataSource
|
|
26
29
|
cardAsALink?: {
|
|
@@ -49,4 +52,13 @@ export interface IList {
|
|
|
49
52
|
};
|
|
50
53
|
};
|
|
51
54
|
}[];
|
|
55
|
+
contracts: {
|
|
56
|
+
id: string;
|
|
57
|
+
endpoint: string;
|
|
58
|
+
actions: ("create" | "get" | "getById" | "update" | "delete" | "clone" | "sendEmail")[];
|
|
59
|
+
request?: IContractRequest;
|
|
60
|
+
conditions?: IFormCondition[];
|
|
61
|
+
businessRules?: IBusinessRule[];
|
|
62
|
+
userStory?: string;
|
|
63
|
+
}[];
|
|
52
64
|
}
|
|
@@ -17,12 +17,13 @@ export interface IProject {
|
|
|
17
17
|
businessPlan?: IBusinessPLan;
|
|
18
18
|
businessRules?: IBusinessRule[];
|
|
19
19
|
flow:
|
|
20
|
-
| "
|
|
21
|
-
| "
|
|
22
|
-
| "
|
|
23
|
-
| "
|
|
24
|
-
| "
|
|
25
|
-
| "
|
|
20
|
+
| "backofficeByInvitationWithoutPermissions"
|
|
21
|
+
| "backofficeByInvitationAndPermissionsByComponent"
|
|
22
|
+
| "backofficeOpenedWithoutPermissions"
|
|
23
|
+
| "backofficeOpenedAndPermissionsByComponent"
|
|
24
|
+
| "marketplace"
|
|
25
|
+
| "landingPage"
|
|
26
|
+
| "socialNetwork";
|
|
26
27
|
frontend?: IFrontend;
|
|
27
28
|
backend?: IBackend;
|
|
28
29
|
modules?: IModule[];
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"type": "array",
|
|
44
44
|
"items": {
|
|
45
45
|
"type": "string",
|
|
46
|
-
"enum": ["create", "get", "getById", "update", "delete", "clone"]
|
|
46
|
+
"enum": ["create", "get", "getById", "update", "delete", "clone", "sendEmail"]
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
"request": {
|
|
@@ -159,7 +159,8 @@
|
|
|
159
159
|
"getById",
|
|
160
160
|
"update",
|
|
161
161
|
"delete",
|
|
162
|
-
"clone"
|
|
162
|
+
"clone",
|
|
163
|
+
"sendEmail"
|
|
163
164
|
]
|
|
164
165
|
}
|
|
165
166
|
}
|
|
@@ -53,6 +53,10 @@
|
|
|
53
53
|
"icon"
|
|
54
54
|
]
|
|
55
55
|
},
|
|
56
|
+
"dataType": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"$ref": "types-datatype.ref.json"
|
|
59
|
+
},
|
|
56
60
|
"isHtml": {
|
|
57
61
|
"type": "boolean"
|
|
58
62
|
},
|
|
@@ -77,7 +81,7 @@
|
|
|
77
81
|
"required": ["link"]
|
|
78
82
|
},
|
|
79
83
|
"conditions": {
|
|
80
|
-
"$ref": "condition.ref.json"
|
|
84
|
+
"$ref": "condition.ref.json"
|
|
81
85
|
}
|
|
82
86
|
},
|
|
83
87
|
"required": ["property"]
|
|
@@ -193,7 +197,228 @@
|
|
|
193
197
|
},
|
|
194
198
|
"required": ["icon", "label", "action"]
|
|
195
199
|
}
|
|
200
|
+
},
|
|
201
|
+
"contracts": {
|
|
202
|
+
"type": "array",
|
|
203
|
+
"items": {
|
|
204
|
+
"type": "object",
|
|
205
|
+
"properties": {
|
|
206
|
+
"id": {
|
|
207
|
+
"type": "string"
|
|
208
|
+
},
|
|
209
|
+
"endpoint": {
|
|
210
|
+
"type": "string"
|
|
211
|
+
},
|
|
212
|
+
"actions": {
|
|
213
|
+
"type": "array",
|
|
214
|
+
"items": {
|
|
215
|
+
"type": "string",
|
|
216
|
+
"enum": [
|
|
217
|
+
"create",
|
|
218
|
+
"get",
|
|
219
|
+
"getById",
|
|
220
|
+
"update",
|
|
221
|
+
"delete",
|
|
222
|
+
"clone",
|
|
223
|
+
"sendEmail"
|
|
224
|
+
]
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
"request": {
|
|
228
|
+
"type": "object",
|
|
229
|
+
"properties": {
|
|
230
|
+
"entity": {
|
|
231
|
+
"type": "string"
|
|
232
|
+
},
|
|
233
|
+
"description": {
|
|
234
|
+
"type": "string"
|
|
235
|
+
},
|
|
236
|
+
"fields": {
|
|
237
|
+
"type": "array",
|
|
238
|
+
"items": {
|
|
239
|
+
"type": "object",
|
|
240
|
+
"properties": {
|
|
241
|
+
"name": {
|
|
242
|
+
"type": "string"
|
|
243
|
+
},
|
|
244
|
+
"dataType": {
|
|
245
|
+
"$ref": "types-datatype.ref.json"
|
|
246
|
+
},
|
|
247
|
+
"isRequired": {
|
|
248
|
+
"type": "boolean"
|
|
249
|
+
},
|
|
250
|
+
"requiredOneOf": {
|
|
251
|
+
"type": "array",
|
|
252
|
+
"items": {
|
|
253
|
+
"type": "string"
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
"isHidden": {
|
|
257
|
+
"type": "boolean",
|
|
258
|
+
"description": "If true, the attribute will not be exposed in the API."
|
|
259
|
+
},
|
|
260
|
+
"foreignKey": {
|
|
261
|
+
"type": "object",
|
|
262
|
+
"properties": {
|
|
263
|
+
"entity": {
|
|
264
|
+
"type": "string"
|
|
265
|
+
},
|
|
266
|
+
"connectionAttribute": {
|
|
267
|
+
"type": "string"
|
|
268
|
+
},
|
|
269
|
+
"relationship": {
|
|
270
|
+
"type": "string",
|
|
271
|
+
"enum": ["one-to-one", "one-to-many", "many-to-many"]
|
|
272
|
+
},
|
|
273
|
+
"fields": {
|
|
274
|
+
"type": "array",
|
|
275
|
+
"items": {
|
|
276
|
+
"type": "object",
|
|
277
|
+
"properties": {
|
|
278
|
+
"name": {
|
|
279
|
+
"type": "string"
|
|
280
|
+
},
|
|
281
|
+
"dataType": {
|
|
282
|
+
"$ref": "types-datatype.ref.json"
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
"required": ["name", "dataType"]
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
"isHidden": {
|
|
289
|
+
"type": "boolean",
|
|
290
|
+
"description": "If true, the connection attribute will not be exposed in the API."
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
"required": [
|
|
294
|
+
"entity",
|
|
295
|
+
"connectionAttribute",
|
|
296
|
+
"relationship"
|
|
297
|
+
]
|
|
298
|
+
},
|
|
299
|
+
"isPrimaryKey": {
|
|
300
|
+
"type": "boolean"
|
|
301
|
+
},
|
|
302
|
+
"minSize": {
|
|
303
|
+
"type": "number"
|
|
304
|
+
},
|
|
305
|
+
"maxSize": {
|
|
306
|
+
"type": "number"
|
|
307
|
+
},
|
|
308
|
+
"enum": {
|
|
309
|
+
"type": "array",
|
|
310
|
+
"items": {
|
|
311
|
+
"oneOf": [
|
|
312
|
+
{
|
|
313
|
+
"type": "string"
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"type": "number"
|
|
317
|
+
}
|
|
318
|
+
]
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
"isUnique": {
|
|
322
|
+
"type": "boolean"
|
|
323
|
+
},
|
|
324
|
+
"uniqueComposedFields": {
|
|
325
|
+
"type": "array",
|
|
326
|
+
"items": {
|
|
327
|
+
"type": "string"
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
"actionsExceptions": {
|
|
331
|
+
"type": "array",
|
|
332
|
+
"items": {
|
|
333
|
+
"type": "string",
|
|
334
|
+
"enum": [
|
|
335
|
+
"create",
|
|
336
|
+
"get",
|
|
337
|
+
"getById",
|
|
338
|
+
"update",
|
|
339
|
+
"delete",
|
|
340
|
+
"clone",
|
|
341
|
+
"sendEmail"
|
|
342
|
+
]
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
"required": ["name", "dataType"]
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
"relatedEntity": {
|
|
350
|
+
"type": "object",
|
|
351
|
+
"properties": {
|
|
352
|
+
"entity": {
|
|
353
|
+
"type": "string",
|
|
354
|
+
"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."
|
|
355
|
+
},
|
|
356
|
+
"connectionAttribute": {
|
|
357
|
+
"type": "string",
|
|
358
|
+
"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."
|
|
359
|
+
},
|
|
360
|
+
"fieldsFromEntity": {
|
|
361
|
+
"type": "array",
|
|
362
|
+
"items": {
|
|
363
|
+
"type": "object",
|
|
364
|
+
"properties": {
|
|
365
|
+
"fields": {
|
|
366
|
+
"$ref": "form.ref.json"
|
|
367
|
+
},
|
|
368
|
+
"contractId": {
|
|
369
|
+
"type": "string"
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
"required": ["fields", "contractId"]
|
|
374
|
+
}
|
|
375
|
+
},
|
|
376
|
+
"required": [
|
|
377
|
+
"entity",
|
|
378
|
+
"connectionAttribute",
|
|
379
|
+
"fieldsFromEntity"
|
|
380
|
+
]
|
|
381
|
+
},
|
|
382
|
+
"uniqueConstraints": {
|
|
383
|
+
"type": "array",
|
|
384
|
+
"items": {
|
|
385
|
+
"type": "object",
|
|
386
|
+
"properties": {
|
|
387
|
+
"name": {
|
|
388
|
+
"type": "string"
|
|
389
|
+
},
|
|
390
|
+
"fields": {
|
|
391
|
+
"type": "array",
|
|
392
|
+
"items": {
|
|
393
|
+
"type": "string"
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
"required": ["entity", "fields"]
|
|
401
|
+
},
|
|
402
|
+
"conditions": {
|
|
403
|
+
"$ref": "condition.ref.json"
|
|
404
|
+
},
|
|
405
|
+
"businessRules": {
|
|
406
|
+
"$ref": "business-rules.ref.json"
|
|
407
|
+
},
|
|
408
|
+
"userStory": {
|
|
409
|
+
"type": "string"
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
"required": ["id", "endpoint", "actions"]
|
|
413
|
+
}
|
|
196
414
|
}
|
|
197
415
|
},
|
|
198
|
-
"required": [
|
|
416
|
+
"required": [
|
|
417
|
+
"componentType",
|
|
418
|
+
"id",
|
|
419
|
+
"title",
|
|
420
|
+
"dataSource",
|
|
421
|
+
"properties",
|
|
422
|
+
"contracts"
|
|
423
|
+
]
|
|
199
424
|
}
|
|
@@ -15,12 +15,13 @@
|
|
|
15
15
|
"flow": {
|
|
16
16
|
"type": "string",
|
|
17
17
|
"enum": [
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
18
|
+
"backofficeByInvitationWithoutPermissions",
|
|
19
|
+
"backofficeByInvitationAndPermissionsByComponent",
|
|
20
|
+
"backofficeOpenedWithoutPermissions",
|
|
21
|
+
"backofficeOpenedAndPermissionsByComponent",
|
|
22
|
+
"marketplace",
|
|
23
|
+
"landingPage",
|
|
24
|
+
"socialNetwork"
|
|
24
25
|
]
|
|
25
26
|
},
|
|
26
27
|
"businessPlan": {
|