rapida-partner 1.0.0 → 1.1.1

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 (41) hide show
  1. package/README.md +4 -1
  2. package/package.json +2 -2
  3. package/rapidaObject.json +1 -3024
  4. package/src/enums/form-contract.enum.ts +30 -0
  5. package/src/enums/form.enum.ts +31 -0
  6. package/src/examples/components/forms/character.form.ts +12 -10
  7. package/src/examples/components/forms/company.form.ts +83 -76
  8. package/src/examples/components/forms/movie.form.ts +53 -21
  9. package/src/examples/components/forms/movieGenre.form.ts +6 -4
  10. package/src/examples/components/forms/person.form.ts +81 -79
  11. package/src/examples/modules/movie.ts +2 -1
  12. package/src/examples/projects/movieBackoffice.ts +1 -1
  13. package/src/interfaces/data-card.interface.ts +2 -30
  14. package/src/interfaces/data-detail.interface.ts +2 -30
  15. package/src/interfaces/form-autocomplete.interface.ts +2 -30
  16. package/src/interfaces/form-file.interface.ts +2 -30
  17. package/src/interfaces/form-input.interface.ts +2 -30
  18. package/src/interfaces/form-select.interface.ts +2 -30
  19. package/src/interfaces/form.interface.ts +22 -33
  20. package/src/schemas/backend-framework-structure.schema.json +2 -2
  21. package/src/schemas/bdd-and-e2e-narratives.ref.json +39 -49
  22. package/src/schemas/bdd-and-e2e.json +30 -33
  23. package/src/schemas/business-plan.ref.json +23 -23
  24. package/src/schemas/business-rules.ref.json +25 -25
  25. package/src/schemas/component-one-of.ref.json +1 -1
  26. package/src/schemas/data-card.ref.json +2 -28
  27. package/src/schemas/data-detail.ref.json +2 -30
  28. package/src/schemas/form-autocomplete.ref.json +1 -29
  29. package/src/schemas/form-contract-request-array.ref.json +25 -0
  30. package/src/schemas/form-contract-request-one-of.ref.json +11 -0
  31. package/src/schemas/form-contract-request.ref.json +42 -0
  32. package/src/schemas/form-file.ref.json +1 -31
  33. package/src/schemas/form-input.ref.json +1 -31
  34. package/src/schemas/form-select.ref.json +1 -29
  35. package/src/schemas/form.ref.json +44 -40
  36. package/src/schemas/frontend-framework-structure.schema.json +1 -5
  37. package/src/schemas/module.ref.json +1 -1
  38. package/src/schemas/project.schema.json +8 -4
  39. package/src/schemas/todo.ref.json +1 -1
  40. package/src/schemas/types-datatype.ref.json +34 -0
  41. package/src/schemas/external-application.ref.json +0 -97
@@ -1,3 +1,4 @@
1
+ import type { EDataType } from "../enums/form.enum";
1
2
  import type { IApiRequest } from "./form-input.interface";
2
3
  import type { IBusinessRule } from "./project.interface";
3
4
 
@@ -42,36 +43,7 @@ export interface IDataCard {
42
43
  export interface IDataCardProperty {
43
44
  property: string;
44
45
  label: string;
45
- type?:
46
- | "text"
47
- | "number"
48
- | "password"
49
- | "email"
50
- | "color"
51
- | "date"
52
- | "wysiwyg"
53
- | "time"
54
- | "file"
55
- | "array"
56
- | "char"
57
- | "nchar"
58
- | "varchar"
59
- | "varchar2"
60
- | "nvarchar"
61
- | "longtext"
62
- | "clob"
63
- | "nclob"
64
- | "decimal"
65
- | "numeric"
66
- | "integer"
67
- | "float"
68
- | "double"
69
- | "real"
70
- | "timestamp"
71
- | "datetime"
72
- | "datetime2"
73
- | "uniqueidentifier"
74
- | "boolean";
46
+ dataType?: EDataType;
75
47
  format?: string;
76
48
  isHtml?: boolean;
77
49
  }
@@ -1,3 +1,4 @@
1
+ import type { EDataType } from "../enums/form.enum";
1
2
  import type { IApiRequest } from "./form-input.interface";
2
3
  import type { IBusinessRule } from "./project.interface";
3
4
 
@@ -48,36 +49,7 @@ export interface IDataDetailSection {
48
49
  export interface IDataDetailProperty {
49
50
  property: string;
50
51
  label: string;
51
- type?:
52
- | "text"
53
- | "number"
54
- | "password"
55
- | "email"
56
- | "color"
57
- | "date"
58
- | "wysiwyg"
59
- | "time"
60
- | "file"
61
- | "array"
62
- | "char"
63
- | "nchar"
64
- | "varchar"
65
- | "varchar2"
66
- | "nvarchar"
67
- | "longtext"
68
- | "clob"
69
- | "nclob"
70
- | "decimal"
71
- | "numeric"
72
- | "integer"
73
- | "float"
74
- | "double"
75
- | "real"
76
- | "timestamp"
77
- | "datetime"
78
- | "datetime2"
79
- | "uniqueidentifier"
80
- | "boolean";
52
+ dataType?: EDataType;
81
53
  format?: string;
82
54
  linkConfig?: {
83
55
  route?: string;
@@ -1,39 +1,11 @@
1
+ import type { EDataType } from "../enums/form.enum";
1
2
  import type { IFormCondition } from "./form-condition.interface";
2
3
  import type { IBusinessRule } from "./project.interface";
3
4
 
4
5
  export interface IFormAutocomplete {
5
6
  type: "autocomplete";
6
7
  name: string;
7
- dataType:
8
- | "text"
9
- | "number"
10
- | "password"
11
- | "email"
12
- | "color"
13
- | "date"
14
- | "wysiwyg"
15
- | "time"
16
- | "file"
17
- | "array"
18
- | "char"
19
- | "nchar"
20
- | "varchar"
21
- | "varchar2"
22
- | "nvarchar"
23
- | "longtext"
24
- | "clob"
25
- | "nclob"
26
- | "decimal"
27
- | "numeric"
28
- | "integer"
29
- | "float"
30
- | "double"
31
- | "real"
32
- | "timestamp"
33
- | "datetime"
34
- | "datetime2"
35
- | "uniqueidentifier"
36
- | "boolean";
8
+ dataType: EDataType;
37
9
  label: string;
38
10
  placeholder?: string;
39
11
  tooltip?: string;
@@ -1,3 +1,4 @@
1
+ import type { EDataType } from "../enums/form.enum";
1
2
  import type { IFormCondition } from "./form-condition.interface";
2
3
  import type { IBusinessRule } from "./project.interface";
3
4
 
@@ -10,36 +11,7 @@ interface IStorageConfig {
10
11
  export interface IFormFile {
11
12
  type: "file";
12
13
  name: string;
13
- dataType:
14
- | "text"
15
- | "number"
16
- | "password"
17
- | "email"
18
- | "color"
19
- | "date"
20
- | "wysiwyg"
21
- | "time"
22
- | "file"
23
- | "array"
24
- | "char"
25
- | "nchar"
26
- | "varchar"
27
- | "varchar2"
28
- | "nvarchar"
29
- | "longtext"
30
- | "clob"
31
- | "nclob"
32
- | "decimal"
33
- | "numeric"
34
- | "integer"
35
- | "float"
36
- | "double"
37
- | "real"
38
- | "timestamp"
39
- | "datetime"
40
- | "datetime2"
41
- | "uniqueidentifier"
42
- | "boolean";
14
+ dataType: EDataType;
43
15
  label: string;
44
16
  placeholder?: string;
45
17
  tooltip?: string;
@@ -1,3 +1,4 @@
1
+ import type { EDataType } from "../enums/form.enum";
1
2
  import type {
2
3
  IApiResponseField,
3
4
  IApiResponseFieldFilter,
@@ -8,36 +9,7 @@ import type { IBusinessRule } from "./project.interface";
8
9
  export interface IFormInput {
9
10
  type: "input";
10
11
  name: string;
11
- dataType:
12
- | "text"
13
- | "number"
14
- | "password"
15
- | "email"
16
- | "color"
17
- | "date"
18
- | "wysiwyg"
19
- | "time"
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";
12
+ dataType: EDataType;
41
13
  label: string;
42
14
  placeholder?: string;
43
15
  tooltip?: string;
@@ -1,40 +1,12 @@
1
1
  import type { IFormCondition } from "./form-condition.interface";
2
2
  import type { IOptionsApi } from "./form-autocomplete.interface";
3
3
  import type { IBusinessRule } from "./project.interface";
4
+ import type { EDataType } from "../enums/form.enum";
4
5
 
5
6
  export interface IFormSelect {
6
7
  type: "select";
7
8
  name: string;
8
- dataType:
9
- | "text"
10
- | "number"
11
- | "password"
12
- | "email"
13
- | "color"
14
- | "date"
15
- | "wysiwyg"
16
- | "time"
17
- | "file"
18
- | "array"
19
- | "char"
20
- | "nchar"
21
- | "varchar"
22
- | "varchar2"
23
- | "nvarchar"
24
- | "longtext"
25
- | "clob"
26
- | "nclob"
27
- | "decimal"
28
- | "numeric"
29
- | "integer"
30
- | "float"
31
- | "double"
32
- | "real"
33
- | "timestamp"
34
- | "datetime"
35
- | "datetime2"
36
- | "uniqueidentifier"
37
- | "boolean";
9
+ dataType: EDataType;
38
10
  label: string;
39
11
  placeholder?: string;
40
12
  tooltip?: string;
@@ -1,3 +1,4 @@
1
+ import type { EFormContractDataType } from "../enums/form-contract.enum";
1
2
  import type { IFormArray } from "./form-array.interface";
2
3
  import type { IFormAutocomplete } from "./form-autocomplete.interface";
3
4
  import type { IFormButton } from "./form-button.interface";
@@ -23,42 +24,30 @@ export interface IForm {
23
24
  methods: { verb: "GET" | "POST" | "PUT" | "DELETE" }[];
24
25
  request?: IApiRequest;
25
26
  }[];
27
+ kanban?: {
28
+ status: "toDo" | "inProgress" | "done";
29
+ assigneesIds?: string[];
30
+ validatorsIds?: string[];
31
+ dueDate?: string;
32
+ tags?: string[];
33
+ priority?: "low" | "medium" | "high" | "urgent";
34
+ storyPoints?: number;
35
+ }
36
+ }
37
+
38
+ interface IFormContractGeneral {
39
+ name: string;
40
+ dataType: EFormContractDataType;
41
+ }
42
+
43
+ interface IFormContractArray {
44
+ name: string;
45
+ dataType: "array";
46
+ elements: (IFormContractGeneral | IFormContractArray)[];
26
47
  }
27
48
 
28
49
  export interface IApiRequest {
29
- body: {
30
- name: string;
31
- dataType:
32
- | "text"
33
- | "number"
34
- | "password"
35
- | "email"
36
- | "color"
37
- | "date"
38
- | "wysiwyg"
39
- | "time"
40
- | "file"
41
- | "array"
42
- | "char"
43
- | "nchar"
44
- | "varchar"
45
- | "varchar2"
46
- | "nvarchar"
47
- | "longtext"
48
- | "clob"
49
- | "nclob"
50
- | "decimal"
51
- | "numeric"
52
- | "integer"
53
- | "float"
54
- | "double"
55
- | "real"
56
- | "timestamp"
57
- | "datetime"
58
- | "datetime2"
59
- | "uniqueidentifier"
60
- | "boolean";
61
- }[];
50
+ body?: (IFormContractGeneral | IFormContractArray)[];
62
51
  }
63
52
 
64
53
  export type IFormElement =
@@ -4,8 +4,8 @@
4
4
  "type": "object",
5
5
  "properties": {
6
6
  "projectFolderCase": {
7
- "type": "string",
8
- "enum": ["kebab", "snake", "pascal", "camel"]
7
+ "type": "string",
8
+ "enum": ["kebab", "snake", "pascal", "camel"]
9
9
  },
10
10
  "controllerFileNomenclature": {
11
11
  "type": "object",
@@ -1,57 +1,47 @@
1
1
  {
2
- "$id": "bdd-and-e2e-narratives.ref.json",
3
- "$schema": "http://json-schema.org/draft-07/schema#",
4
- "type": "array",
5
- "items": {
6
- "type": "object",
7
- "properties": {
2
+ "$id": "bdd-and-e2e-narratives.ref.json",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "type": "array",
5
+ "items": {
6
+ "type": "object",
7
+ "properties": {
8
+ "title": {
9
+ "type": "string"
10
+ },
11
+ "description": {
12
+ "type": "string"
13
+ },
14
+ "businessRules": {
15
+ "$ref": "business-rules.ref.json"
16
+ },
17
+ "scenarios": {
18
+ "type": "array",
19
+ "items": {
20
+ "type": "object",
21
+ "properties": {
8
22
  "title": {
9
- "type": "string"
23
+ "type": "string"
10
24
  },
11
25
  "description": {
12
- "type": "string"
26
+ "type": "string"
13
27
  },
14
28
  "businessRules": {
15
- "$ref": "business-rules.ref.json"
16
- },
17
- "scenarios": {
18
- "type": "array",
19
- "items": {
20
- "type": "object",
21
- "properties": {
22
- "title": {
23
- "type": "string"
24
- },
25
- "description": {
26
- "type": "string"
27
- },
28
- "businessRules": {
29
- "$ref": "business-rules.ref.json"
30
- }
31
- },
32
- "required": [
33
- "title",
34
- "description"
35
- ]
36
- }
37
- },
38
- "e2e": {
39
- "type": "object",
40
- "properties": {
41
- "cypress": {
42
- "type": "string"
43
- }
44
- },
45
- "required": [
46
- "cypress"
47
- ]
29
+ "$ref": "business-rules.ref.json"
48
30
  }
31
+ },
32
+ "required": ["title", "description"]
33
+ }
34
+ },
35
+ "e2e": {
36
+ "type": "object",
37
+ "properties": {
38
+ "cypress": {
39
+ "type": "string"
40
+ }
49
41
  },
50
- "required": [
51
- "title",
52
- "description",
53
- "scenarios",
54
- "e2e"
55
- ]
56
- }
57
- }
42
+ "required": ["cypress"]
43
+ }
44
+ },
45
+ "required": ["title", "description", "scenarios", "e2e"]
46
+ }
47
+ }
@@ -1,36 +1,33 @@
1
1
  {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "type": "object",
4
- "properties": {
5
- "bddTitle": {
6
- "type": "string"
7
- },
8
- "businessRules": {
9
- "$ref": "business-rules.ref.json"
10
- },
11
- "forms": {
12
- "type": "array",
13
- "elements": {
14
- "type": "object",
15
- "properties": {
16
- "forms": {
17
- "$ref": "form.ref.json",
18
- "narratives": {
19
- "$ref": "bdd-and-e2e-narratives.ref.json"
20
- }
21
- },
22
- "lists": {
23
- "$ref": "list.ref.json",
24
- "narratives": {
25
- "$ref": "bdd-and-e2e-narratives.ref.json"
26
- }
27
- }
28
- }
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "bddTitle": {
6
+ "type": "string"
7
+ },
8
+ "businessRules": {
9
+ "$ref": "business-rules.ref.json"
10
+ },
11
+ "forms": {
12
+ "type": "array",
13
+ "elements": {
14
+ "type": "object",
15
+ "properties": {
16
+ "forms": {
17
+ "$ref": "form.ref.json",
18
+ "narratives": {
19
+ "$ref": "bdd-and-e2e-narratives.ref.json"
29
20
  }
21
+ },
22
+ "lists": {
23
+ "$ref": "list.ref.json",
24
+ "narratives": {
25
+ "$ref": "bdd-and-e2e-narratives.ref.json"
26
+ }
27
+ }
30
28
  }
31
- },
32
- "required": [
33
- "bddTitle",
34
- "narratives"
35
- ]
36
- }
29
+ }
30
+ }
31
+ },
32
+ "required": ["bddTitle", "narratives"]
33
+ }
@@ -1,25 +1,25 @@
1
1
  {
2
- "$id": "business-plan.ref.json",
3
- "$schema": "http://json-schema.org/draft-07/schema#",
4
- "type": "object",
5
- "properties": {
6
- "businessValue": {
7
- "type": "string"
8
- },
9
- "targetMarket": {
10
- "type": "string"
11
- },
12
- "benchmarkings": {
13
- "type": "string"
14
- },
15
- "legalIssues": {
16
- "type": "string"
17
- },
18
- "ethicalIssues": {
19
- "type": "string"
20
- },
21
- "afterSale": {
22
- "type": "string"
23
- }
2
+ "$id": "business-plan.ref.json",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "type": "object",
5
+ "properties": {
6
+ "businessValue": {
7
+ "type": "string"
8
+ },
9
+ "targetMarket": {
10
+ "type": "string"
11
+ },
12
+ "benchmarkings": {
13
+ "type": "string"
14
+ },
15
+ "legalIssues": {
16
+ "type": "string"
17
+ },
18
+ "ethicalIssues": {
19
+ "type": "string"
20
+ },
21
+ "afterSale": {
22
+ "type": "string"
24
23
  }
25
- }
24
+ }
25
+ }
@@ -1,34 +1,34 @@
1
1
  {
2
- "$id": "business-rules.ref.json",
3
- "$schema": "http://json-schema.org/draft-07/schema#",
4
- "type": "array",
5
- "items": {
2
+ "$id": "business-rules.ref.json",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "type": "array",
5
+ "items": {
6
+ "type": "object",
7
+ "properties": {
8
+ "rule": {
6
9
  "type": "object",
7
10
  "properties": {
8
- "rule": {
9
- "type": "object",
10
- "properties": {
11
+ "description": {
12
+ "type": "string"
13
+ },
14
+ "subrules": {
15
+ "type": "array",
16
+ "items": {
17
+ "type": "object",
18
+ "properties": {
19
+ "subrule": {
20
+ "type": "object",
21
+ "properties": {
11
22
  "description": {
12
- "type": "string"
13
- },
14
- "subrules": {
15
- "type": "array",
16
- "items": {
17
- "type": "object",
18
- "properties": {
19
- "subrule": {
20
- "type": "object",
21
- "properties": {
22
- "description": {
23
- "type": "string"
24
- }
25
- }
26
- }
27
- }
28
- }
23
+ "type": "string"
29
24
  }
25
+ }
30
26
  }
27
+ }
31
28
  }
29
+ }
32
30
  }
31
+ }
33
32
  }
34
- }
33
+ }
34
+ }
@@ -12,4 +12,4 @@
12
12
  { "$ref": "dashboard.ref.json" },
13
13
  { "$ref": "panel.ref.json" }
14
14
  ]
15
- }
15
+ }
@@ -105,35 +105,9 @@
105
105
  "label": {
106
106
  "type": "string"
107
107
  },
108
- "type": {
108
+ "dataType": {
109
109
  "type": "string",
110
- "enum": [
111
- "text",
112
- "date",
113
- "currency",
114
- "number",
115
- "boolean",
116
- "badge",
117
- "icon",
118
- "char",
119
- "nchar",
120
- "varchar",
121
- "varchar2",
122
- "nvarchar",
123
- "longtext",
124
- "clob",
125
- "nclob",
126
- "decimal",
127
- "numeric",
128
- "integer",
129
- "float",
130
- "double",
131
- "real",
132
- "timestamp",
133
- "datetime",
134
- "datetime2",
135
- "uniqueidentifier"
136
- ]
110
+ "$ref": "types-datatype.ref.json"
137
111
  },
138
112
  "format": {
139
113
  "type": "string"