rapida-partner 1.8.0 → 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/interfaces/form-array.interface.ts +1 -0
- package/src/interfaces/form.interface.ts +1 -1
- package/src/interfaces/list.interface.ts +12 -0
- package/src/interfaces/project.interface.ts +3 -3
- package/src/schemas/form-array.ref.json +3 -0
- package/src/schemas/list.ref.json +227 -2
package/package.json
CHANGED
|
@@ -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,9 +17,9 @@ export interface IProject {
|
|
|
17
17
|
businessPlan?: IBusinessPLan;
|
|
18
18
|
businessRules?: IBusinessRule[];
|
|
19
19
|
flow:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
| "backofficeByInvitationWithoutPermissions"
|
|
21
|
+
| "backofficeByInvitationAndPermissionsByComponent"
|
|
22
|
+
| "backofficeOpenedWithoutPermissions"
|
|
23
23
|
| "backofficeOpenedAndPermissionsByComponent"
|
|
24
24
|
| "marketplace"
|
|
25
25
|
| "landingPage"
|
|
@@ -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
|
}
|