rapida-partner 1.10.1 → 1.11.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rapida-partner",
3
- "version": "1.10.1",
3
+ "version": "1.11.0",
4
4
  "main": "dist/index.js",
5
5
  "module": "index.ts",
6
6
  "files": [
@@ -11,7 +11,7 @@ export const characterList: IList = {
11
11
  paramType: "query",
12
12
  hasAuthentication: true,
13
13
  },
14
- properties: [
14
+ listItems: [
15
15
  { label: "Nome", property: "characterName", type: "title", dataType: EDataType.NVARCHAR },
16
16
  { label: "Descrição", property: "characterDescription", type: "description", isHtml: true, dataType: EDataType.LONGTEXT },
17
17
  ],
@@ -11,7 +11,7 @@ export const movieList: IList = {
11
11
  paramType: "query",
12
12
  hasAuthentication: true,
13
13
  },
14
- properties: [
14
+ listItems: [
15
15
  {
16
16
  property: "pictureFile", type: "image", label: "Cartaz", dataType: EDataType.NVARCHAR,
17
17
  },
@@ -11,7 +11,7 @@ export const movieEpisodeList: IList = {
11
11
  paramType: "query",
12
12
  hasAuthentication: true,
13
13
  },
14
- properties: [
14
+ listItems: [
15
15
  {
16
16
  property: "episodeTitle", type: "title", label: "Título", dataType: EDataType.NVARCHAR,
17
17
  },
@@ -11,7 +11,7 @@ export const movieGenreList: IList = {
11
11
  paramType: "query",
12
12
  hasAuthentication: true,
13
13
  },
14
- properties: [
14
+ listItems: [
15
15
  {
16
16
  property: "name", type: "title", label: "Nome", dataType: EDataType.NVARCHAR,
17
17
  },
@@ -5,62 +5,79 @@ import type { IContractRequest } from "./form.interface";
5
5
  import type { IBusinessRule } from "./project.interface";
6
6
 
7
7
  export interface IList {
8
- componentType: "list";
9
- id: string; // named according to component file name (<id>.<componentType>.ts)
10
- title: string;
11
- userStory?: string;
12
- guards?: string[];
13
- dataSource: IApiRequest;
8
+ componentType: "list";
9
+ id: string; // named according to component file name (<id>.<componentType>.ts)
10
+ title: string;
11
+ userStory?: string;
12
+ guards?: string[];
13
+ dataSource: IApiRequest;
14
+ businessRules?: IBusinessRule[];
15
+ listItems: {
16
+ property?: string; // property taken from dataSource response. e.g.: "email"
17
+ label?: string; // label to property. e.g.: "E-mail"
18
+ type?:
19
+ | "title"
20
+ | "subtitle"
21
+ | "description"
22
+ | "video"
23
+ | "image"
24
+ | "images"
25
+ | "icon";
26
+ isHtml?: boolean;
27
+ isLink?: boolean;
28
+ isTimestamp?: boolean;
29
+ callToAction?: {
30
+ link: string; // e.g.: "/user"
31
+ usePropertyAsQuery?: boolean; // if true then "/user/<email>"
32
+ };
33
+ dataType: EDataType;
34
+ conditions?: IFormCondition[];
14
35
  businessRules?: IBusinessRule[];
15
- properties: {
16
- property: string; // property taken from dataSource response. e.g.: "email"
17
- label?: string; // label to property. e.g.: "E-mail"
18
- type?: "title" | "subtitle" | "description" | "video" | "image" | "images" | "icon";
19
- isHtml?: boolean;
20
- isLink?: boolean;
21
- isTimestamp?: boolean;
22
- callToAction?: {
23
- link: string; // e.g.: "/user"
24
- usePropertyAsQuery?: boolean; // if true then "/user/<email>"
25
- };
26
- dataType: EDataType;
27
- conditions?: IFormCondition[];
28
- businessRules?: IBusinessRule[];
29
- todo?: string;
30
- }[]; // properties taken from dataSource
31
- cardAsALink?: {
32
- link: string; // e.g.: "/user"
36
+ todo?: string;
37
+ }[]; // properties taken from dataSource
38
+ cardAsALink?: {
39
+ link: string; // e.g.: "/user"
40
+ propertiesAsQueryParam?: string[]; // if, for example, ["_id", "email"], then "/user?_id=value&email=value"
41
+ propertiesAsPathParam?: string[]; // if, for example, ["_id", "email"], then "/user/<_id>/<email>"
42
+ };
43
+ callsToActionMenu?: {
44
+ icon: string; // Material icons e.g: "pencil"
45
+ label: string; // e.g: "Editar"
46
+ action: {
47
+ link: {
48
+ // frontend url to be redirected on action completition
49
+ endpoint: string; // e.g.: "/user"
33
50
  propertiesAsQueryParam?: string[]; // if, for example, ["_id", "email"], then "/user?_id=value&email=value"
34
51
  propertiesAsPathParam?: string[]; // if, for example, ["_id", "email"], then "/user/<_id>/<email>"
35
- };
36
- callsToActionMenu?: {
37
- icon: string; // Material icons e.g: "pencil"
38
- label: string; // e.g: "Editar"
39
- action: {
40
- link: { // frontend url to be redirected on action completition
41
- endpoint: string; // e.g.: "/user"
42
- propertiesAsQueryParam?: string[]; // if, for example, ["_id", "email"], then "/user?_id=value&email=value"
43
- propertiesAsPathParam?: string[]; // if, for example, ["_id", "email"], then "/user/<_id>/<email>"
44
- };
45
- request?: { // backend request endpoint that must be processed before link redirection
46
- endpoint: string; // e.g.: "/user"
47
- propertiesAsQueryParam?: string[]; // if, for example, ["_id", "email"], then "/user?_id=value&email=value"
48
- propertiesAsPathParam?: string[]; // if, for example, ["_id", "email"], then "/user/<_id>/<email>"
49
- verb: "get" | "post" | "put" | "delete";
50
- dialog?: {
51
- title: string;
52
- message: string;
53
- };
54
- };
52
+ };
53
+ request?: {
54
+ // backend request endpoint that must be processed before link redirection
55
+ endpoint: string; // e.g.: "/user"
56
+ propertiesAsQueryParam?: string[]; // if, for example, ["_id", "email"], then "/user?_id=value&email=value"
57
+ propertiesAsPathParam?: string[]; // if, for example, ["_id", "email"], then "/user/<_id>/<email>"
58
+ verb: "get" | "post" | "put" | "delete";
59
+ dialog?: {
60
+ title: string;
61
+ message: string;
55
62
  };
56
- }[];
57
- contracts: {
58
- id: string;
59
- endpoint: string;
60
- actions: ("create" | "get" | "getById" | "update" | "delete" | "clone" | "sendEmail")[];
61
- request?: IContractRequest;
62
- conditions?: IFormCondition[];
63
- businessRules?: IBusinessRule[];
64
- userStory?: string;
65
- }[];
66
- }
63
+ };
64
+ };
65
+ }[];
66
+ contracts: {
67
+ id: string;
68
+ endpoint: string;
69
+ actions: (
70
+ | "create"
71
+ | "get"
72
+ | "getById"
73
+ | "update"
74
+ | "delete"
75
+ | "clone"
76
+ | "sendEmail"
77
+ )[];
78
+ request?: IContractRequest;
79
+ conditions?: IFormCondition[];
80
+ businessRules?: IBusinessRule[];
81
+ userStory?: string;
82
+ }[];
83
+ }
@@ -50,7 +50,15 @@ export interface IBusinessRule {
50
50
  description: string;
51
51
  subrules?: {
52
52
  description: string;
53
+ implementation?: {
54
+ type: "frontend" | "backend" | "both";
55
+ details: string;
56
+ };
53
57
  }[];
58
+ implementation?: {
59
+ type: "frontend" | "backend" | "both";
60
+ details: string;
61
+ };
54
62
  };
55
63
  }
56
64
 
@@ -11,6 +11,19 @@
11
11
  "description": {
12
12
  "type": "string"
13
13
  },
14
+ "implementation": {
15
+ "type": "object",
16
+ "properties": {
17
+ "type": {
18
+ "type": "string",
19
+ "enum": ["frontend", "backend", "both"]
20
+ },
21
+ "details": {
22
+ "type": "string"
23
+ }
24
+ },
25
+ "required": ["type", "details"]
26
+ },
14
27
  "subrules": {
15
28
  "type": "array",
16
29
  "items": {
@@ -21,6 +34,19 @@
21
34
  "properties": {
22
35
  "description": {
23
36
  "type": "string"
37
+ },
38
+ "implementation": {
39
+ "type": "object",
40
+ "properties": {
41
+ "type": {
42
+ "type": "string",
43
+ "enum": ["frontend", "backend", "both"]
44
+ },
45
+ "details": {
46
+ "type": "string"
47
+ }
48
+ },
49
+ "required": ["type", "details"]
24
50
  }
25
51
  }
26
52
  }
@@ -31,4 +57,4 @@
31
57
  }
32
58
  }
33
59
  }
34
- }
60
+ }
@@ -28,7 +28,7 @@
28
28
  "businessRules": {
29
29
  "$ref": "business-rules.ref.json"
30
30
  },
31
- "properties": {
31
+ "listItems": {
32
32
  "type": "array",
33
33
  "items": {
34
34
  "type": "object",
@@ -89,8 +89,7 @@
89
89
  "todo": {
90
90
  "type": "string"
91
91
  }
92
- },
93
- "required": ["property"]
92
+ }
94
93
  }
95
94
  },
96
95
  "cardAsALink": {