rapida-partner 1.11.0 → 1.13.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.
@@ -10,7 +10,7 @@ export const characterForm: IForm = {
10
10
  {
11
11
  id: "characters",
12
12
  endpoint: "/characters",
13
- actions: ["create", "get", "getById", "update", "delete"],
13
+ actions: ["create", "get", "getById", "update", "softDelete"],
14
14
  request: {
15
15
  entity: "characters",
16
16
  description: "Represents a character in a story or narrative.",
@@ -61,7 +61,7 @@ export const movieForm: IForm = {
61
61
  label: "Gêneros",
62
62
  name: "movieGenres",
63
63
  optionsApi: {
64
- endpoint: "/api/movies-genres",
64
+ endpoint: "/api/movie-genres",
65
65
  labelField: ["name"],
66
66
  valueField: "_id",
67
67
  paramsToFilter: ["name"],
@@ -99,7 +99,7 @@ export const movieForm: IForm = {
99
99
  {
100
100
  id: "movies",
101
101
  endpoint: "/movies",
102
- actions: ["create", "update", "getById", "get", "delete"],
102
+ actions: ["create", "update", "getById", "get", "softDelete"],
103
103
  request: {
104
104
  entity: "Movie",
105
105
  description: "Represents a movie or TV series in the system.",
@@ -140,7 +140,7 @@ export const movieForm: IForm = {
140
140
  verb: "getById",
141
141
  },
142
142
  {
143
- verb: "delete",
143
+ verb: "softDelete",
144
144
  }
145
145
  ],
146
146
  }
@@ -51,7 +51,7 @@ export const movieEpisodeForm: IForm = {
51
51
  {
52
52
  id: "moviesEpisodes",
53
53
  endpoint: "/movies-episodes",
54
- actions: ["create", "get", "getById", "update", "delete"],
54
+ actions: ["create", "get", "getById", "update", "softDelete"],
55
55
  request: {
56
56
  entity: "MovieEpisode",
57
57
  description: "Represents an episode of a TV series or show.",
@@ -25,11 +25,11 @@ export const movieGenreForm: IForm = {
25
25
  ],
26
26
  contracts: [
27
27
  {
28
- id: "moviesGenres",
28
+ id: "movieGenres",
29
29
  endpoint: "/movie-genres",
30
- actions: ["create", "get", "getById", "update", "delete"],
30
+ actions: ["create", "get", "getById", "update", "softDelete"],
31
31
  request : {
32
- entity: "moviesGenres",
32
+ entity: "movieGenres",
33
33
  description: "",
34
34
  fields: [
35
35
  {
@@ -35,7 +35,7 @@ export const characterList: IList = {
35
35
  },
36
36
  request: {
37
37
  endpoint: "/characters",
38
- verb: "delete",
38
+ verb: "softDelete",
39
39
  propertiesAsPathParam: ["_id"],
40
40
  dialog: {
41
41
  title: "Excluir projeto",
@@ -48,7 +48,7 @@ export const movieList: IList = {
48
48
  },
49
49
  request: {
50
50
  endpoint: "/movies",
51
- verb: "delete",
51
+ verb: "softDelete",
52
52
  propertiesAsPathParam: ["_id"],
53
53
  dialog: {
54
54
  title: "Excluir conteúdo",
@@ -62,7 +62,7 @@ export const movieList: IList = {
62
62
  {
63
63
  id: "movies",
64
64
  endpoint: "/movies",
65
- actions: ["create", "update", "getById", "get", "delete"],
65
+ actions: ["create", "update", "getById", "get", "softDelete"],
66
66
  request: {
67
67
  entity: "Movie",
68
68
  description: "Represents a movie or TV series in the system.",
@@ -39,7 +39,7 @@ export const movieEpisodeList: IList = {
39
39
  },
40
40
  request: {
41
41
  endpoint: "/movies-episodes",
42
- verb: "delete",
42
+ verb: "softDelete",
43
43
  propertiesAsPathParam: ["_id"],
44
44
  dialog: {
45
45
  title: "Excluir conteúdo",
@@ -53,7 +53,7 @@ export const movieEpisodeList: IList = {
53
53
  {
54
54
  id: "moviesEpisodes",
55
55
  endpoint: "/movies-episodes",
56
- actions: ["create", "get", "getById", "update", "delete"],
56
+ actions: ["create", "get", "getById", "update", "softDelete"],
57
57
  request: {
58
58
  entity: "MovieEpisode",
59
59
  description: "Represents an episode of a TV series or show.",
@@ -7,7 +7,7 @@ export const movieGenreList: IList = {
7
7
  title: "Lista de gêneros de filmes",
8
8
  guards: ["isAuthorized"],
9
9
  dataSource: {
10
- endpoint: "/movies-genres",
10
+ endpoint: "/movie-genres",
11
11
  paramType: "query",
12
12
  hasAuthentication: true,
13
13
  },
@@ -38,8 +38,8 @@ export const movieGenreList: IList = {
38
38
  endpoint: "/movie-genre-list",
39
39
  },
40
40
  request: {
41
- endpoint: "/movies-genres",
42
- verb: "delete",
41
+ endpoint: "/movie-genres",
42
+ verb: "softDelete",
43
43
  propertiesAsPathParam: ["_id"],
44
44
  dialog: {
45
45
  title: "Excluir conteúdo",
@@ -51,11 +51,11 @@ export const movieGenreList: IList = {
51
51
  ],
52
52
  contracts: [
53
53
  {
54
- id: "moviesGenres",
54
+ id: "movieGenres",
55
55
  endpoint: "/movie-genres",
56
- actions: ["create", "get", "getById", "update", "delete"],
56
+ actions: ["create", "get", "getById", "update", "softDelete"],
57
57
  request : {
58
- entity: "moviesGenres",
58
+ entity: "movieGenres",
59
59
  description: "",
60
60
  fields: [
61
61
  {
@@ -11,7 +11,7 @@ export interface IActor {
11
11
  }
12
12
 
13
13
  export interface IActionWithElement {
14
- verb: "create" | "get" | "getById" | "update" | "delete" | "clone" | "sendEmail";
14
+ verb: "create" | "get" | "getById" | "update" | "softDelete" | "hardDelete" | "clone" | "sendEmail";
15
15
  elements?: IFlowChartElement[];
16
16
  businessRules?: IBusinessRule[];
17
17
  }
@@ -25,7 +25,7 @@ export interface IForm {
25
25
  contracts: {
26
26
  id: string;
27
27
  endpoint: string;
28
- actions: ("create" | "get" | "getById" | "update" | "delete" | "clone" | "sendEmail")[];
28
+ actions: ("create" | "get" | "getById" | "update" | "softDelete" | "hardDelete" | "clone" | "sendEmail")[];
29
29
  request?: IContractRequest;
30
30
  conditions?: IFormCondition[];
31
31
  businessRules?: IBusinessRule[];
@@ -79,7 +79,7 @@ export interface IContractRequestField {
79
79
  isUnique?: boolean;
80
80
  uniqueComposedFields?: string[];
81
81
  defaultValue?: string | number | boolean;
82
- actionsExceptions?: ("create" | "getOne" | "getAll" | "update" | "delete" | "clone")[];
82
+ actionsExceptions?: ("create" | "getOne" | "getAll" | "update" | "softDelete" | "hardDelete" | "clone")[];
83
83
  }
84
84
 
85
85
  interface IContractRequestFieldForeignKey {
@@ -55,7 +55,7 @@ export interface IList {
55
55
  endpoint: string; // e.g.: "/user"
56
56
  propertiesAsQueryParam?: string[]; // if, for example, ["_id", "email"], then "/user?_id=value&email=value"
57
57
  propertiesAsPathParam?: string[]; // if, for example, ["_id", "email"], then "/user/<_id>/<email>"
58
- verb: "get" | "post" | "put" | "delete";
58
+ verb: "get" | "post" | "put" | "softDelete" | "hardDelete";
59
59
  dialog?: {
60
60
  title: string;
61
61
  message: string;
@@ -71,7 +71,8 @@ export interface IList {
71
71
  | "get"
72
72
  | "getById"
73
73
  | "update"
74
- | "delete"
74
+ | "softDelete"
75
+ | "hardDelete"
75
76
  | "clone"
76
77
  | "sendEmail"
77
78
  )[];
@@ -10,7 +10,8 @@
10
10
  "get",
11
11
  "getById",
12
12
  "update",
13
- "delete",
13
+ "softDelete",
14
+ "hardDelete",
14
15
  "clone",
15
16
  "sendEmail"
16
17
  ]
@@ -43,7 +43,7 @@
43
43
  "type": "array",
44
44
  "items": {
45
45
  "type": "string",
46
- "enum": ["create", "get", "getById", "update", "delete", "clone", "sendEmail"]
46
+ "enum": ["create", "get", "getById", "update", "softDelete", "hardDelete", "clone", "sendEmail"]
47
47
  }
48
48
  },
49
49
  "request": {
@@ -158,7 +158,8 @@
158
158
  "get",
159
159
  "getById",
160
160
  "update",
161
- "delete",
161
+ "softDelete",
162
+ "hardDelete",
162
163
  "clone",
163
164
  "sendEmail"
164
165
  ]
@@ -179,7 +179,7 @@
179
179
  },
180
180
  "verb": {
181
181
  "type": "string",
182
- "enum": ["get", "post", "put", "delete"]
182
+ "enum": ["get", "post", "put", "softDelete"]
183
183
  },
184
184
  "dialog": {
185
185
  "type": "object",
@@ -223,7 +223,8 @@
223
223
  "get",
224
224
  "getById",
225
225
  "update",
226
- "delete",
226
+ "softDelete",
227
+ "hardDelete",
227
228
  "clone",
228
229
  "sendEmail"
229
230
  ]
@@ -341,7 +342,8 @@
341
342
  "get",
342
343
  "getById",
343
344
  "update",
344
- "delete",
345
+ "softDelete",
346
+ "hardDelete",
345
347
  "clone",
346
348
  "sendEmail"
347
349
  ]
@@ -373,9 +375,9 @@
373
375
  "contractId": {
374
376
  "type": "string"
375
377
  }
376
- }
377
- },
378
- "required": ["fields", "contractId"]
378
+ },
379
+ "required": ["fields", "contractId"]
380
+ }
379
381
  }
380
382
  },
381
383
  "required": [
@@ -418,12 +420,5 @@
418
420
  }
419
421
  }
420
422
  },
421
- "required": [
422
- "componentType",
423
- "id",
424
- "title",
425
- "dataSource",
426
- "properties",
427
- "contracts"
428
- ]
423
+ "required": ["componentType", "id", "title", "dataSource", "contracts"]
429
424
  }
@@ -1,125 +0,0 @@
1
- import { EDataType } from "../../../enums/form.enum";
2
- import type { IForm } from "../../../interfaces/form.interface";
3
-
4
- export const testForm: IForm = {
5
- title: "Formulário teste",
6
- componentType: "form",
7
- id: "testFormForm",
8
- guards: "isAuthorized",
9
- elements: [
10
- {
11
- id: "testFormTab",
12
- type: "tab",
13
- tabs: [
14
- {
15
- title: "Dados principais",
16
- id: "mainDataTab",
17
- elements: [
18
- {
19
- label: "Nome",
20
- name: "name",
21
- type: "input",
22
- dataType: EDataType.TEXT,
23
- },
24
- {
25
- title: "Coisa aleatória",
26
- id: "randomThingFieldset",
27
- type: "fieldset",
28
- elements: [
29
- {
30
- label: "Qualquer coisa*",
31
- name: "anything",
32
- type: "select",
33
- dataType: EDataType.TEXT,
34
- isRequired: true,
35
- options: [
36
- { label: "Rótulo para a opção 1", value: "optionOneLabel" },
37
- { label: "Rótulo para a opção 2", value: "optionTwoLabel" },
38
- { label: "Rótulo para a opção 3", value: "optionThreeLabel" },
39
- ],
40
- },
41
- {
42
- label: "Outras coisas para escolher*",
43
- name: "otherThingsToChoose",
44
- type: "select",
45
- dataType: EDataType.TEXT,
46
- isRequired: true,
47
- isMultiple: true,
48
- options: [
49
- { label: "Rótulo para a opção 1", value: "optionOneLabel" },
50
- { label: "Rótulo para a opção 2", value: "optionTwoLabel" },
51
- { label: "Rótulo para a opção 3", value: "optionThreeLabel" },
52
- ],
53
- },
54
- {
55
- label: "Uma terceira coisa*",
56
- name: "aThirdThingId",
57
- type: "autocomplete",
58
- dataType: EDataType.TEXT,
59
- isRequired: true,
60
- optionsApi: {
61
- endpoint: "/endpoint-to-use",
62
- // leave it blank so documenter will be forced to check it
63
- },
64
- },
65
- ],
66
- },
67
- {
68
- label: "Hobbies",
69
- name: "hobbiesId",
70
- type: "autocomplete",
71
- dataType: EDataType.TEXT,
72
- isMultiple: true,
73
- optionsApi: {
74
- endpoint: "/endpoint-to-use",
75
- // leave it blank so documenter will be forced to check it
76
- },
77
- },
78
- ],
79
- },
80
- {
81
- title: "Dados secundários",
82
- id: "secondaryDataTab",
83
- elements: [
84
- {
85
- label: "Data de nascimento*",
86
- name: "dateOfBirth",
87
- type: "input",
88
- dataType: EDataType.DATE,
89
- isRequired: true,
90
- },
91
- {
92
- label: "Adicionar mais coisas",
93
- name: "addMoreThingsArray",
94
- type: "array",
95
- elements: [
96
- {
97
- label: "Rótulo de input de arquivo",
98
- name: "fileInputLabelUrl",
99
- type: "file",
100
- dataType: EDataType.TEXT,
101
- storageConfig: {
102
- fileNameStrategy: "uuid",
103
- // leave it blank so documenter will be forced to check it
104
- },
105
- },
106
- {
107
- label: "Rótulo de input de senha",
108
- name: "passwordInputLabel",
109
- type: "input",
110
- dataType: EDataType.PASSWORD,
111
- },
112
- {
113
- label: "Rótulo de input de número",
114
- name: "numberInputLabel",
115
- type: "input",
116
- dataType: EDataType.NUMBER,
117
- },
118
- ],
119
- },
120
- ],
121
- },
122
- ],
123
- },
124
- ],
125
- };