rapida-partner 2.1.0 → 2.3.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.
Files changed (46) hide show
  1. package/package.json +1 -1
  2. package/src/interfaces/data-chart.interface.ts +5 -4
  3. package/src/interfaces/form-array.interface.ts +3 -2
  4. package/src/interfaces/form-autocomplete.interface.ts +4 -3
  5. package/src/interfaces/form-button.interface.ts +3 -2
  6. package/src/interfaces/form-checkbox.interface.ts +4 -3
  7. package/src/interfaces/form-datepicker.interface.ts +4 -3
  8. package/src/interfaces/form-fieldset.interface.ts +2 -1
  9. package/src/interfaces/form-file.interface.ts +4 -3
  10. package/src/interfaces/form-input.interface.ts +4 -3
  11. package/src/interfaces/form-numeric.interface.ts +4 -3
  12. package/src/interfaces/form-pattern.interface.ts +4 -3
  13. package/src/interfaces/form-radio.interface.ts +4 -3
  14. package/src/interfaces/form-radiogroup.interface.ts +4 -3
  15. package/src/interfaces/form-select.interface.ts +5 -4
  16. package/src/interfaces/form-switch.interface.ts +3 -2
  17. package/src/interfaces/form-tab.interface.ts +2 -1
  18. package/src/interfaces/form.interface.ts +3 -2
  19. package/src/interfaces/language.interface.ts +3 -0
  20. package/src/interfaces/list.interface.ts +6 -5
  21. package/src/interfaces/project.interface.ts +20 -1
  22. package/src/interfaces/translatable.interface.ts +6 -0
  23. package/src/schemas/business-rules.ref.json +64 -0
  24. package/src/schemas/data-chart.ref.json +5 -5
  25. package/src/schemas/form-array.ref.json +2 -2
  26. package/src/schemas/form-autocomplete.ref.json +3 -3
  27. package/src/schemas/form-button.ref.json +2 -2
  28. package/src/schemas/form-checkbox.ref.json +3 -3
  29. package/src/schemas/form-datepicker.ref.json +3 -3
  30. package/src/schemas/form-fieldset.ref.json +1 -1
  31. package/src/schemas/form-file.ref.json +4 -29
  32. package/src/schemas/form-input.ref.json +6 -3
  33. package/src/schemas/form-numeric.ref.json +3 -3
  34. package/src/schemas/form-pattern.ref.json +3 -3
  35. package/src/schemas/form-radio.ref.json +3 -3
  36. package/src/schemas/form-radiogroup.ref.json +3 -3
  37. package/src/schemas/form-select.ref.json +4 -4
  38. package/src/schemas/form-switch.ref.json +2 -2
  39. package/src/schemas/form-tab.ref.json +1 -1
  40. package/src/schemas/form.ref.json +2 -2
  41. package/src/schemas/language.ref.json +6 -0
  42. package/src/schemas/list.ref.json +5 -5
  43. package/src/schemas/module.ref.json +1 -1
  44. package/src/schemas/project.schema.json +11 -0
  45. package/src/schemas/storage-config.ref.json +30 -0
  46. package/src/schemas/translatable.ref.json +17 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rapida-partner",
3
- "version": "2.1.0",
3
+ "version": "2.3.0",
4
4
  "main": "dist/index.js",
5
5
  "module": "index.ts",
6
6
  "files": [
@@ -1,5 +1,6 @@
1
1
  import type { IApiRequest } from "./form-input.interface";
2
2
  import type { IBusinessRule } from "./project.interface";
3
+ import type { TTranslatable } from "./translatable.interface";
3
4
 
4
5
  export type IChartType =
5
6
  | "line"
@@ -26,7 +27,7 @@ export interface IChartLabelFormatter {
26
27
  export interface IChartAxisOptions {
27
28
  title?: {
28
29
  display?: boolean;
29
- text?: string;
30
+ text?: TTranslatable;
30
31
  };
31
32
  grid?: {
32
33
  display?: boolean;
@@ -46,7 +47,7 @@ export interface IChartOptions {
46
47
  plugins?: {
47
48
  title?: {
48
49
  display?: boolean;
49
- text?: string;
50
+ text?: TTranslatable;
50
51
  };
51
52
  legend?: {
52
53
  display?: boolean;
@@ -65,7 +66,7 @@ export interface IChartOptions {
65
66
  export interface IDataChart {
66
67
  componentType: "dataChart";
67
68
  id: string;
68
- title: string;
69
+ title: TTranslatable;
69
70
  userStory?: string;
70
71
  icon?: string;
71
72
  guards?: "isAuthenticated" | "isAuthorized";
@@ -90,7 +91,7 @@ export interface IDataChart {
90
91
 
91
92
  export interface IChartDataset {
92
93
  property: string;
93
- label: string;
94
+ label: TTranslatable;
94
95
  backgroundColor?: string | string[];
95
96
  borderColor?: string | string[];
96
97
  borderWidth?: number;
@@ -1,3 +1,4 @@
1
+ import type { TTranslatable } from "./translatable.interface";
1
2
  import type { IFormCondition } from "./condition.interface";
2
3
  import type { IFormElement } from "./form.interface";
3
4
  import type { IBusinessRule } from "./project.interface";
@@ -5,9 +6,9 @@ import type { IBusinessRule } from "./project.interface";
5
6
  export interface IFormArray {
6
7
  type: "array";
7
8
  name: string;
8
- label: string;
9
+ label: TTranslatable;
9
10
  elements: IFormElement[];
10
- tooltip?: string;
11
+ tooltip?: TTranslatable;
11
12
  conditions?: IFormCondition;
12
13
  todo?: string;
13
14
  businessRules?: IBusinessRule[];
@@ -1,3 +1,4 @@
1
+ import type { TTranslatable } from "./translatable.interface";
1
2
  import type { EDataType } from "../enums/form.enum";
2
3
  import type { IFormCondition } from "./condition.interface";
3
4
  import type { IBusinessRule } from "./project.interface";
@@ -6,9 +7,9 @@ export interface IFormAutocomplete {
6
7
  type: "autocomplete";
7
8
  name: string;
8
9
  dataType: EDataType;
9
- label: string;
10
- placeholder?: string;
11
- tooltip?: string;
10
+ label: TTranslatable;
11
+ placeholder?: TTranslatable;
12
+ tooltip?: TTranslatable;
12
13
  isAutofocus?: boolean;
13
14
  isDisabled?: boolean;
14
15
  isDisabledOnUpdate?: boolean;
@@ -1,3 +1,4 @@
1
+ import type { TTranslatable } from "./translatable.interface";
1
2
  import type { IFormCondition } from "./condition.interface";
2
3
  import type { IApiRequest } from "./form-input.interface";
3
4
  import type { IBusinessRule, IComponent } from "./project.interface";
@@ -5,11 +6,11 @@ import type { IBusinessRule, IComponent } from "./project.interface";
5
6
  export interface IFormButton {
6
7
  type: "button";
7
8
  id: string;
8
- label: string;
9
+ label: TTranslatable;
9
10
  actionType: "submit" | "reset" | "link" | "apiRequest" | "modal";
10
11
  todo?: string;
11
12
  icon?: string;
12
- tooltip?: string;
13
+ tooltip?: TTranslatable;
13
14
  isDisabled?: boolean;
14
15
  isDisabledOnUpdate?: boolean;
15
16
  isHidden?: boolean;
@@ -1,3 +1,4 @@
1
+ import type { TTranslatable } from "./translatable.interface";
1
2
  // MODIFICATION BASED ON: src/interfaces/form-checkbox.interface.ts
2
3
  import type { IFormCondition } from "./condition.interface";
3
4
  import type { IBusinessRule } from "./project.interface";
@@ -5,9 +6,9 @@ import type { IBusinessRule } from "./project.interface";
5
6
  export interface IFormCheckbox {
6
7
  type: "checkbox";
7
8
  name: string;
8
- label: string;
9
+ label: TTranslatable;
9
10
  options: ICheckboxOption[];
10
- tooltip?: string;
11
+ tooltip?: TTranslatable;
11
12
  isDisabled?: boolean;
12
13
  isDisabledOnUpdate?: boolean;
13
14
  isHidden?: boolean;
@@ -20,7 +21,7 @@ export interface IFormCheckbox {
20
21
  }
21
22
 
22
23
  export interface ICheckboxOption {
23
- label: string;
24
+ label: TTranslatable;
24
25
  value: string | number | boolean;
25
26
  isDisabled?: boolean;
26
27
  isSelected?: boolean;
@@ -1,12 +1,13 @@
1
+ import type { TTranslatable } from "./translatable.interface";
1
2
  import type { IFormCondition } from "./condition.interface";
2
3
  import type { IBusinessRule } from "./project.interface";
3
4
 
4
5
  export interface IFormDatePicker {
5
6
  type: "datepicker";
6
7
  name: string;
7
- label: string;
8
- placeholder?: string;
9
- tooltip?: string;
8
+ label: TTranslatable;
9
+ placeholder?: TTranslatable;
10
+ tooltip?: TTranslatable;
10
11
  minDate?: string;
11
12
  maxDate?: string;
12
13
  isDisabled?: boolean;
@@ -1,3 +1,4 @@
1
+ import type { TTranslatable } from "./translatable.interface";
1
2
  import type { IFormCondition } from "./condition.interface";
2
3
  import type { IFormElement } from "./form.interface";
3
4
  import type { IBusinessRule } from "./project.interface";
@@ -7,7 +8,7 @@ export interface IFormFieldset {
7
8
  conditions?: IFormCondition;
8
9
  todo?: string;
9
10
  id: string;
10
- title: string;
11
+ title: TTranslatable;
11
12
  elements: IFormElement[];
12
13
  businessRules?: IBusinessRule[];
13
14
  elementDescription?: string;
@@ -1,3 +1,4 @@
1
+ import type { TTranslatable } from "./translatable.interface";
1
2
  import type { EDataType } from "../enums/form.enum";
2
3
  import type { IFormCondition } from "./condition.interface";
3
4
  import type { IBusinessRule } from "./project.interface";
@@ -12,9 +13,9 @@ export interface IFormFile {
12
13
  type: "file";
13
14
  name: string;
14
15
  dataType: EDataType;
15
- label: string;
16
- placeholder?: string;
17
- tooltip?: string;
16
+ label: TTranslatable;
17
+ placeholder?: TTranslatable;
18
+ tooltip?: TTranslatable;
18
19
  accept?: Record<string, string[]>;
19
20
  isMultiple?: boolean;
20
21
  isProfilePicture?: boolean;
@@ -1,3 +1,4 @@
1
+ import type { TTranslatable } from "./translatable.interface";
1
2
  import type { EDataType } from "../enums/form.enum";
2
3
  import type { IFormCondition } from "./condition.interface";
3
4
  import type {
@@ -10,9 +11,9 @@ import type { IStorageConfig } from "./form-file.interface";
10
11
  interface IFormInputBase {
11
12
  type: "input";
12
13
  name: string;
13
- label: string;
14
- placeholder?: string;
15
- tooltip?: string;
14
+ label: TTranslatable;
15
+ placeholder?: TTranslatable;
16
+ tooltip?: TTranslatable;
16
17
  isAutofocus?: boolean;
17
18
  isDisabled?: boolean;
18
19
  isDisabledOnUpdate?: boolean;
@@ -1,12 +1,13 @@
1
+ import type { TTranslatable } from "./translatable.interface";
1
2
  import type { IFormCondition } from "./condition.interface";
2
3
  import type { IBusinessRule } from "./project.interface";
3
4
 
4
5
  export interface IFormNumericInput {
5
6
  type: "numeric";
6
7
  name: string;
7
- label: string;
8
- placeholder?: string;
9
- tooltip?: string;
8
+ label: TTranslatable;
9
+ placeholder?: TTranslatable;
10
+ tooltip?: TTranslatable;
10
11
  prefix?: string;
11
12
  suffix?: string;
12
13
  decimalScale?: number;
@@ -1,13 +1,14 @@
1
+ import type { TTranslatable } from "./translatable.interface";
1
2
  import type { IFormCondition } from "./condition.interface";
2
3
  import type { IBusinessRule } from "./project.interface";
3
4
 
4
5
  export interface IFormPatternInput {
5
6
  type: "pattern";
6
7
  name: string;
7
- label: string;
8
+ label: TTranslatable;
8
9
  format: string;
9
- placeholder?: string;
10
- tooltip?: string;
10
+ placeholder?: TTranslatable;
11
+ tooltip?: TTranslatable;
11
12
  isDisabled?: boolean;
12
13
  isRequired?: boolean;
13
14
  conditions?: IFormCondition;
@@ -1,3 +1,4 @@
1
+ import type { TTranslatable } from "./translatable.interface";
1
2
  // MODIFICATION BASED ON: src/interfaces/form-radio.interface.ts
2
3
  import type { IFormCondition } from "./condition.interface";
3
4
  import type { IBusinessRule } from "./project.interface";
@@ -5,9 +6,9 @@ import type { IBusinessRule } from "./project.interface";
5
6
  export interface IFormRadio {
6
7
  type: "radio";
7
8
  name: string;
8
- label: string;
9
+ label: TTranslatable;
9
10
  options: IRadioOption[];
10
- tooltip?: string;
11
+ tooltip?: TTranslatable;
11
12
  isDisabled?: boolean;
12
13
  isDisabledOnUpdate?: boolean;
13
14
  isHidden?: boolean;
@@ -20,7 +21,7 @@ export interface IFormRadio {
20
21
  }
21
22
 
22
23
  export interface IRadioOption {
23
- label: string;
24
+ label: TTranslatable;
24
25
  value: string | number | boolean;
25
26
  isDisabled?: boolean;
26
27
  isSelected?: boolean;
@@ -1,17 +1,18 @@
1
+ import type { TTranslatable } from "./translatable.interface";
1
2
  import type { IFormCondition } from "./condition.interface";
2
3
  import type { IBusinessRule } from "./project.interface";
3
4
 
4
5
  interface IRadioOption {
5
- label: string;
6
+ label: TTranslatable;
6
7
  value: string | number | boolean;
7
8
  }
8
9
 
9
10
  export interface IFormRadioGroup {
10
11
  type: "radiogroup";
11
12
  name: string;
12
- label: string;
13
+ label: TTranslatable;
13
14
  options: IRadioOption[];
14
- tooltip?: string;
15
+ tooltip?: TTranslatable;
15
16
  isDisabled?: boolean;
16
17
  isDisabledOnUpdate?: boolean;
17
18
  isHidden?: boolean;
@@ -1,3 +1,4 @@
1
+ import type { TTranslatable } from "./translatable.interface";
1
2
  import type { IFormCondition } from "./condition.interface";
2
3
  import type { IOptionsApi } from "./form-autocomplete.interface";
3
4
  import type { IBusinessRule } from "./project.interface";
@@ -7,9 +8,9 @@ export interface IFormSelect {
7
8
  type: "select";
8
9
  name: string;
9
10
  dataType: EDataType;
10
- label: string;
11
- placeholder?: string;
12
- tooltip?: string;
11
+ label: TTranslatable;
12
+ placeholder?: TTranslatable;
13
+ tooltip?: TTranslatable;
13
14
  isAutofocus?: boolean;
14
15
  isDisabled?: boolean;
15
16
  isDisabledOnUpdate?: boolean;
@@ -28,7 +29,7 @@ export interface IFormSelect {
28
29
  }
29
30
 
30
31
  export interface ISelectOption {
31
- label: string;
32
+ label: TTranslatable;
32
33
  value: string | number | boolean;
33
34
  isDisabled?: boolean;
34
35
  isSelected?: boolean;
@@ -1,11 +1,12 @@
1
+ import type { TTranslatable } from "./translatable.interface";
1
2
  import type { IFormCondition } from "./condition.interface";
2
3
  import type { IBusinessRule } from "./project.interface";
3
4
 
4
5
  export interface IFormSwitch {
5
6
  type: "switch";
6
7
  name: string;
7
- label: string;
8
- tooltip?: string;
8
+ label: TTranslatable;
9
+ tooltip?: TTranslatable;
9
10
  isDisabled?: boolean;
10
11
  isDisabledOnUpdate?: boolean;
11
12
  isHidden?: boolean;
@@ -1,3 +1,4 @@
1
+ import type { TTranslatable } from "./translatable.interface";
1
2
  import type { IFormCondition } from "./condition.interface";
2
3
  import type { IFormElement } from "./form.interface";
3
4
  import type { IBusinessRule } from "./project.interface";
@@ -8,7 +9,7 @@ export interface IFormTab {
8
9
  id: string;
9
10
  tabs: {
10
11
  id: string;
11
- title: string;
12
+ title: TTranslatable;
12
13
  elements: IFormElement[];
13
14
  conditions?: IFormCondition;
14
15
  }[];
@@ -1,3 +1,4 @@
1
+ import type { TTranslatable } from "./translatable.interface";
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";
@@ -19,9 +20,9 @@ import type { IRecordReminder } from "./record-reminder.interface";
19
20
  export interface IForm {
20
21
  componentType: "form";
21
22
  id: string;
22
- title: string;
23
+ title: TTranslatable;
23
24
  elements: IFormElement[];
24
- subtitle?: string;
25
+ subtitle?: TTranslatable;
25
26
  icon?: string;
26
27
  guards?: "isAuthenticated" | "isAuthorized";
27
28
  businessRules?: IBusinessRule[];
@@ -0,0 +1,3 @@
1
+ // Tags BCP 47 na mesma grafia usada pelo frontend gerado (ngx-translate:
2
+ // assets/i18n/<idioma>.json, I18nService.supportedLangs).
3
+ export type TLanguage = "pt-BR" | "en-US" | "es-ES";
@@ -4,11 +4,12 @@ import type { IContract, IPublicContract } from "./form-contract.interface";
4
4
  import type { IApiRequest } from "./form-input.interface";
5
5
  import type { IFormElement } from "./form.interface";
6
6
  import type { IBusinessRule } from "./project.interface";
7
+ import type { TTranslatable } from "./translatable.interface";
7
8
 
8
9
  export interface IList {
9
10
  componentType: "list";
10
11
  id: string; // named according to component file name (<id>.<componentType>.ts)
11
- title: string;
12
+ title: TTranslatable;
12
13
  userStory?: string;
13
14
  guards?: string[];
14
15
  dataSource: IApiRequest;
@@ -16,7 +17,7 @@ export interface IList {
16
17
  isListItemSelectable?: boolean;
17
18
  listItems: {
18
19
  property?: string; // property taken from dataSource response. e.g.: "email"
19
- label?: string; // label to property. e.g.: "E-mail"
20
+ label?: TTranslatable; // label to property. e.g.: "E-mail"
20
21
  type?:
21
22
  | "title"
22
23
  | "subtitle"
@@ -49,7 +50,7 @@ export interface IList {
49
50
  };
50
51
  callsToActionMenu?: {
51
52
  icon: string; // Material icons e.g: "pencil"
52
- label: string; // e.g: "Editar"
53
+ label: TTranslatable; // e.g: "Editar"
53
54
  action: {
54
55
  linkAfterAction?: {
55
56
  // frontend url to be redirected on action completition
@@ -70,8 +71,8 @@ export interface IList {
70
71
  propertiesAsPathParam?: string[]; // if, for example, ["_id", "email"], then "/user/<_id>/<email>"
71
72
  verb: "get" | "post" | "put" | "softDelete" | "hardDelete";
72
73
  dialog?: {
73
- title: string;
74
- message: string;
74
+ title: TTranslatable;
75
+ message: TTranslatable;
75
76
  };
76
77
  };
77
78
  };
@@ -8,12 +8,14 @@ import type { IE2e } from "./e2e.interface";
8
8
  import type { IFlowChart } from "./form-flowchart.interface";
9
9
  import type { IForm } from "./form.interface";
10
10
  import type { IKanban } from "./kanban.interface";
11
+ import type { TLanguage } from "./language.interface";
11
12
  import type { IPanel } from "./layout-panel.interface";
12
13
  import type { IList } from "./list.interface";
13
14
  import type { INotification } from "./notification.interface";
14
15
  import type { IBackend } from "./project-backend.interface";
15
16
  import type { IProjectRepositories } from "./project-repositories.interface";
16
17
  import type { IStyle } from "./project-style.interface";
18
+ import type { TTranslatable } from "./translatable.interface";
17
19
 
18
20
  export interface IProject {
19
21
  id: string;
@@ -22,6 +24,10 @@ export interface IProject {
22
24
  businessPlan?: IBusinessPLan;
23
25
  businessRules?: IBusinessRule[];
24
26
  skeleton: "backoffice" | "marketplace" | "landingPage" | "socialNetwork" | "service" | "aiAgent";
27
+ // Idiomas em que os textos TTranslatable (label, placeholder, tooltip, title)
28
+ // são declarados. Sem languages, o projeto é monolíngue em defaultLanguage.
29
+ languages?: TLanguage[];
30
+ defaultLanguage?: TLanguage;
25
31
  flows?: {
26
32
  authentication?: boolean;
27
33
  registrationMethod?: 'link' | 'code';
@@ -97,6 +103,11 @@ interface IBusinessPLan {
97
103
  * Para ancorar a inserção num ponto específico, a primeira linha de `codeStartLocation` precisa já ser
98
104
  * essa linha (estendendo o texto para frente, se necessário, só para ganhar unicidade).
99
105
  * "replace" substitui exatamente o trecho casado (substring, não a linha inteira) pelo `code`.
106
+ *
107
+ * `dependencies`/`devDependencies`: pacotes npm que o `code` usa, nome -> versão exata (ex.:
108
+ * `{ exceljs: "4.4.0" }`). O gerador soma ao package.json do lado correspondente quando o `framework`
109
+ * bate com o ativo na geração; se o pacote já existir no template com outra versão, mantém a do
110
+ * template e avisa.
100
111
  */
101
112
  export interface IBusinessRule {
102
113
  rule: {
@@ -114,6 +125,8 @@ export interface IBusinessRule {
114
125
  codeStartLocation: string;
115
126
  code: string;
116
127
  }[];
128
+ dependencies?: Record<string, string>;
129
+ devDependencies?: Record<string, string>;
117
130
  };
118
131
  frontendComplementaryCode?: {
119
132
  framework:
@@ -128,6 +141,8 @@ export interface IBusinessRule {
128
141
  codeStartLocation: string;
129
142
  code: string;
130
143
  }[];
144
+ dependencies?: Record<string, string>;
145
+ devDependencies?: Record<string, string>;
131
146
  };
132
147
  }[];
133
148
  implementation?: {
@@ -141,6 +156,8 @@ export interface IBusinessRule {
141
156
  codeStartLocation: string;
142
157
  code: string;
143
158
  }[];
159
+ dependencies?: Record<string, string>;
160
+ devDependencies?: Record<string, string>;
144
161
  };
145
162
  frontendComplementaryCode?: {
146
163
  framework:
@@ -155,13 +172,15 @@ export interface IBusinessRule {
155
172
  codeStartLocation: string;
156
173
  code: string;
157
174
  }[];
175
+ dependencies?: Record<string, string>;
176
+ devDependencies?: Record<string, string>;
158
177
  };
159
178
  };
160
179
  }
161
180
 
162
181
  export interface IModule {
163
182
  id: string;
164
- title: string;
183
+ title: TTranslatable;
165
184
  icon: string;
166
185
  components: IComponent[];
167
186
  businessRules?: IBusinessRule[];
@@ -0,0 +1,6 @@
1
+ import type { TLanguage } from "./language.interface";
2
+
3
+ // Texto exibido ao usuário. String simples continua válida e é tratada como
4
+ // texto no idioma padrão do projeto (IProject.defaultLanguage); o mapa por
5
+ // idioma permite declarar as traduções de cada TLanguage.
6
+ export type TTranslatable = string | Partial<Record<TLanguage, string>>;
@@ -69,6 +69,22 @@
69
69
  "code"
70
70
  ]
71
71
  }
72
+ },
73
+ "dependencies": {
74
+ "type": "object",
75
+ "description": "Pacotes npm que o código complementar precisa, nome -> versão exata (ex.: \"exceljs\": \"4.4.0\"). O gerador soma ao package.json do lado (backend/frontend) quando o framework bate com o ativo.",
76
+ "additionalProperties": {
77
+ "type": "string",
78
+ "pattern": "^\\d+\\.\\d+\\.\\d+(-[0-9A-Za-z.-]+)?$"
79
+ }
80
+ },
81
+ "devDependencies": {
82
+ "type": "object",
83
+ "description": "Como dependencies, mas vai para devDependencies do package.json.",
84
+ "additionalProperties": {
85
+ "type": "string",
86
+ "pattern": "^\\d+\\.\\d+\\.\\d+(-[0-9A-Za-z.-]+)?$"
87
+ }
72
88
  }
73
89
  },
74
90
  "required": [
@@ -115,6 +131,22 @@
115
131
  "code"
116
132
  ]
117
133
  }
134
+ },
135
+ "dependencies": {
136
+ "type": "object",
137
+ "description": "Pacotes npm que o código complementar precisa, nome -> versão exata (ex.: \"exceljs\": \"4.4.0\"). O gerador soma ao package.json do lado (backend/frontend) quando o framework bate com o ativo.",
138
+ "additionalProperties": {
139
+ "type": "string",
140
+ "pattern": "^\\d+\\.\\d+\\.\\d+(-[0-9A-Za-z.-]+)?$"
141
+ }
142
+ },
143
+ "devDependencies": {
144
+ "type": "object",
145
+ "description": "Como dependencies, mas vai para devDependencies do package.json.",
146
+ "additionalProperties": {
147
+ "type": "string",
148
+ "pattern": "^\\d+\\.\\d+\\.\\d+(-[0-9A-Za-z.-]+)?$"
149
+ }
118
150
  }
119
151
  },
120
152
  "required": [
@@ -191,6 +223,22 @@
191
223
  "code"
192
224
  ]
193
225
  }
226
+ },
227
+ "dependencies": {
228
+ "type": "object",
229
+ "description": "Pacotes npm que o código complementar precisa, nome -> versão exata (ex.: \"exceljs\": \"4.4.0\"). O gerador soma ao package.json do lado (backend/frontend) quando o framework bate com o ativo.",
230
+ "additionalProperties": {
231
+ "type": "string",
232
+ "pattern": "^\\d+\\.\\d+\\.\\d+(-[0-9A-Za-z.-]+)?$"
233
+ }
234
+ },
235
+ "devDependencies": {
236
+ "type": "object",
237
+ "description": "Como dependencies, mas vai para devDependencies do package.json.",
238
+ "additionalProperties": {
239
+ "type": "string",
240
+ "pattern": "^\\d+\\.\\d+\\.\\d+(-[0-9A-Za-z.-]+)?$"
241
+ }
194
242
  }
195
243
  },
196
244
  "required": [
@@ -238,6 +286,22 @@
238
286
  "code"
239
287
  ]
240
288
  }
289
+ },
290
+ "dependencies": {
291
+ "type": "object",
292
+ "description": "Pacotes npm que o código complementar precisa, nome -> versão exata (ex.: \"exceljs\": \"4.4.0\"). O gerador soma ao package.json do lado (backend/frontend) quando o framework bate com o ativo.",
293
+ "additionalProperties": {
294
+ "type": "string",
295
+ "pattern": "^\\d+\\.\\d+\\.\\d+(-[0-9A-Za-z.-]+)?$"
296
+ }
297
+ },
298
+ "devDependencies": {
299
+ "type": "object",
300
+ "description": "Como dependencies, mas vai para devDependencies do package.json.",
301
+ "additionalProperties": {
302
+ "type": "string",
303
+ "pattern": "^\\d+\\.\\d+\\.\\d+(-[0-9A-Za-z.-]+)?$"
304
+ }
241
305
  }
242
306
  },
243
307
  "required": [
@@ -10,7 +10,7 @@
10
10
  "type": "string"
11
11
  },
12
12
  "title": {
13
- "type": "string"
13
+ "$ref": "translatable.ref.json"
14
14
  },
15
15
  "icon": {
16
16
  "type": "string"
@@ -96,7 +96,7 @@
96
96
  "type": "string"
97
97
  },
98
98
  "label": {
99
- "type": "string"
99
+ "$ref": "translatable.ref.json"
100
100
  },
101
101
  "backgroundColor": {
102
102
  "oneOf": [
@@ -175,7 +175,7 @@
175
175
  "type": "boolean"
176
176
  },
177
177
  "text": {
178
- "type": "string"
178
+ "$ref": "translatable.ref.json"
179
179
  }
180
180
  }
181
181
  },
@@ -219,7 +219,7 @@
219
219
  "type": "boolean"
220
220
  },
221
221
  "text": {
222
- "type": "string"
222
+ "$ref": "translatable.ref.json"
223
223
  }
224
224
  }
225
225
  },
@@ -243,7 +243,7 @@
243
243
  "type": "boolean"
244
244
  },
245
245
  "text": {
246
- "type": "string"
246
+ "$ref": "translatable.ref.json"
247
247
  }
248
248
  }
249
249
  },
@@ -9,7 +9,7 @@
9
9
  "$ref": "condition.ref.json"
10
10
  },
11
11
  "tooltip": {
12
- "type": "string"
12
+ "$ref": "translatable.ref.json"
13
13
  },
14
14
  "todo": {
15
15
  "type": "string"
@@ -24,7 +24,7 @@
24
24
  "type": "string"
25
25
  },
26
26
  "label": {
27
- "type": "string"
27
+ "$ref": "translatable.ref.json"
28
28
  },
29
29
  "elements": {
30
30
  "$ref": "form-one-of.ref.json"
@@ -13,13 +13,13 @@
13
13
  "$ref": "types-datatype.ref.json"
14
14
  },
15
15
  "label": {
16
- "type": "string"
16
+ "$ref": "translatable.ref.json"
17
17
  },
18
18
  "placeholder": {
19
- "type": "string"
19
+ "$ref": "translatable.ref.json"
20
20
  },
21
21
  "tooltip": {
22
- "type": "string"
22
+ "$ref": "translatable.ref.json"
23
23
  },
24
24
  "isAutofocus": {
25
25
  "type": "boolean"
@@ -15,7 +15,7 @@
15
15
  "enum": ["submit", "reset", "link", "apiRequest", "modal"]
16
16
  },
17
17
  "label": {
18
- "type": "string"
18
+ "$ref": "translatable.ref.json"
19
19
  },
20
20
  "todo": {
21
21
  "type": "string"
@@ -30,7 +30,7 @@
30
30
  "type": "string"
31
31
  },
32
32
  "tooltip": {
33
- "type": "string"
33
+ "$ref": "translatable.ref.json"
34
34
  },
35
35
  "isDisabled": {
36
36
  "type": "boolean"
@@ -10,7 +10,7 @@
10
10
  "type": "string"
11
11
  },
12
12
  "label": {
13
- "type": "string"
13
+ "$ref": "translatable.ref.json"
14
14
  },
15
15
  "options": {
16
16
  "type": "array",
@@ -18,7 +18,7 @@
18
18
  "type": "object",
19
19
  "properties": {
20
20
  "label": {
21
- "type": "string"
21
+ "$ref": "translatable.ref.json"
22
22
  },
23
23
  "value": {
24
24
  "oneOf": [
@@ -38,7 +38,7 @@
38
38
  }
39
39
  },
40
40
  "tooltip": {
41
- "type": "string"
41
+ "$ref": "translatable.ref.json"
42
42
  },
43
43
  "isDisabled": {
44
44
  "type": "boolean"
@@ -11,13 +11,13 @@
11
11
  "type": "string"
12
12
  },
13
13
  "label": {
14
- "type": "string"
14
+ "$ref": "translatable.ref.json"
15
15
  },
16
16
  "placeholder": {
17
- "type": "string"
17
+ "$ref": "translatable.ref.json"
18
18
  },
19
19
  "tooltip": {
20
- "type": "string"
20
+ "$ref": "translatable.ref.json"
21
21
  },
22
22
  "minDate": {
23
23
  "type": "string",
@@ -21,7 +21,7 @@
21
21
  "type": "string"
22
22
  },
23
23
  "title": {
24
- "type": "string"
24
+ "$ref": "translatable.ref.json"
25
25
  },
26
26
  "elements": {
27
27
  "$ref": "form-one-of.ref.json"
@@ -14,13 +14,13 @@
14
14
  "$ref": "types-datatype.ref.json"
15
15
  },
16
16
  "label": {
17
- "type": "string"
17
+ "$ref": "translatable.ref.json"
18
18
  },
19
19
  "placeholder": {
20
- "type": "string"
20
+ "$ref": "translatable.ref.json"
21
21
  },
22
22
  "tooltip": {
23
- "type": "string"
23
+ "$ref": "translatable.ref.json"
24
24
  },
25
25
  "accept": {
26
26
  "type": "object",
@@ -87,32 +87,7 @@
87
87
  }
88
88
  },
89
89
  "storageConfig": {
90
- "type": "object",
91
- "properties": {
92
- "path": {
93
- "type": "string",
94
- "description": "Path prefix inside the bucket. E.g., 'public/movies/' or 'private/documents/'. The generator will determine the bucket based on the first segment ('public' or 'private')."
95
- },
96
- "fileNameStrategy": {
97
- "type": "string",
98
- "enum": [
99
- "uuid",
100
- "original",
101
- "timestamp"
102
- ]
103
- },
104
- "visibility": {
105
- "type": "string",
106
- "enum": [
107
- "public",
108
- "private"
109
- ]
110
- }
111
- },
112
- "required": [
113
- "path",
114
- "fileNameStrategy"
115
- ]
90
+ "$ref": "storage-config.ref.json"
116
91
  }
117
92
  },
118
93
  "required": [
@@ -13,13 +13,13 @@
13
13
  "$ref": "types-datatype.ref.json"
14
14
  },
15
15
  "label": {
16
- "type": "string"
16
+ "$ref": "translatable.ref.json"
17
17
  },
18
18
  "placeholder": {
19
- "type": "string"
19
+ "$ref": "translatable.ref.json"
20
20
  },
21
21
  "tooltip": {
22
- "type": "string"
22
+ "$ref": "translatable.ref.json"
23
23
  },
24
24
  "isAutofocus": {
25
25
  "type": "boolean"
@@ -104,6 +104,9 @@
104
104
  3,
105
105
  4
106
106
  ]
107
+ },
108
+ "storageConfig": {
109
+ "$ref": "storage-config.ref.json"
107
110
  }
108
111
  },
109
112
  "required": [
@@ -11,13 +11,13 @@
11
11
  "type": "string"
12
12
  },
13
13
  "label": {
14
- "type": "string"
14
+ "$ref": "translatable.ref.json"
15
15
  },
16
16
  "placeholder": {
17
- "type": "string"
17
+ "$ref": "translatable.ref.json"
18
18
  },
19
19
  "tooltip": {
20
- "type": "string"
20
+ "$ref": "translatable.ref.json"
21
21
  },
22
22
  "prefix": {
23
23
  "type": "string"
@@ -11,16 +11,16 @@
11
11
  "type": "string"
12
12
  },
13
13
  "label": {
14
- "type": "string"
14
+ "$ref": "translatable.ref.json"
15
15
  },
16
16
  "format": {
17
17
  "type": "string"
18
18
  },
19
19
  "placeholder": {
20
- "type": "string"
20
+ "$ref": "translatable.ref.json"
21
21
  },
22
22
  "tooltip": {
23
- "type": "string"
23
+ "$ref": "translatable.ref.json"
24
24
  },
25
25
  "isDisabled": {
26
26
  "type": "boolean"
@@ -10,7 +10,7 @@
10
10
  "type": "string"
11
11
  },
12
12
  "label": {
13
- "type": "string"
13
+ "$ref": "translatable.ref.json"
14
14
  },
15
15
  "options": {
16
16
  "type": "array",
@@ -18,7 +18,7 @@
18
18
  "type": "object",
19
19
  "properties": {
20
20
  "label": {
21
- "type": "string"
21
+ "$ref": "translatable.ref.json"
22
22
  },
23
23
  "value": {
24
24
  "oneOf": [
@@ -38,7 +38,7 @@
38
38
  }
39
39
  },
40
40
  "tooltip": {
41
- "type": "string"
41
+ "$ref": "translatable.ref.json"
42
42
  },
43
43
  "isDisabled": {
44
44
  "type": "boolean"
@@ -11,7 +11,7 @@
11
11
  "type": "string"
12
12
  },
13
13
  "label": {
14
- "type": "string"
14
+ "$ref": "translatable.ref.json"
15
15
  },
16
16
  "options": {
17
17
  "type": "array",
@@ -19,7 +19,7 @@
19
19
  "type": "object",
20
20
  "properties": {
21
21
  "label": {
22
- "type": "string"
22
+ "$ref": "translatable.ref.json"
23
23
  },
24
24
  "value": {
25
25
  "oneOf": [
@@ -39,7 +39,7 @@
39
39
  }
40
40
  },
41
41
  "tooltip": {
42
- "type": "string"
42
+ "$ref": "translatable.ref.json"
43
43
  },
44
44
  "isDisabled": {
45
45
  "type": "boolean"
@@ -13,13 +13,13 @@
13
13
  "$ref": "types-datatype.ref.json"
14
14
  },
15
15
  "label": {
16
- "type": "string"
16
+ "$ref": "translatable.ref.json"
17
17
  },
18
18
  "placeholder": {
19
- "type": "string"
19
+ "$ref": "translatable.ref.json"
20
20
  },
21
21
  "tooltip": {
22
- "type": "string"
22
+ "$ref": "translatable.ref.json"
23
23
  },
24
24
  "isAutofocus": {
25
25
  "type": "boolean"
@@ -79,7 +79,7 @@
79
79
  "type": "object",
80
80
  "properties": {
81
81
  "label": {
82
- "type": "string"
82
+ "$ref": "translatable.ref.json"
83
83
  },
84
84
  "value": {
85
85
  "oneOf": [
@@ -11,10 +11,10 @@
11
11
  "type": "string"
12
12
  },
13
13
  "label": {
14
- "type": "string"
14
+ "$ref": "translatable.ref.json"
15
15
  },
16
16
  "tooltip": {
17
- "type": "string"
17
+ "$ref": "translatable.ref.json"
18
18
  },
19
19
  "isDisabled": {
20
20
  "type": "boolean"
@@ -26,7 +26,7 @@
26
26
  "type":"string"
27
27
  },
28
28
  "title": {
29
- "type":"string"
29
+ "$ref": "translatable.ref.json"
30
30
  },
31
31
  "elements": {
32
32
  "$ref": "form-one-of.ref.json"
@@ -10,10 +10,10 @@
10
10
  "type": "string"
11
11
  },
12
12
  "title": {
13
- "type": "string"
13
+ "$ref": "translatable.ref.json"
14
14
  },
15
15
  "subtitle": {
16
- "type": "string"
16
+ "$ref": "translatable.ref.json"
17
17
  },
18
18
  "icon": {
19
19
  "type": "string"
@@ -0,0 +1,6 @@
1
+ {
2
+ "$id": "language.ref.json",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "type": "string",
5
+ "enum": ["pt-BR", "en-US", "es-ES"]
6
+ }
@@ -11,7 +11,7 @@
11
11
  "description": "Named according to component file name (<id>.<componentType>.ts)"
12
12
  },
13
13
  "title": {
14
- "type": "string"
14
+ "$ref": "translatable.ref.json"
15
15
  },
16
16
  "guards": {
17
17
  "type": "array",
@@ -41,7 +41,7 @@
41
41
  "description": "Property name in the response object. e.g.: 'email'"
42
42
  },
43
43
  "label": {
44
- "type": "string",
44
+ "$ref": "translatable.ref.json",
45
45
  "description": "Label to property. e.g.: 'E-mail'"
46
46
  },
47
47
  "type": {
@@ -136,7 +136,7 @@
136
136
  "description": "Material icons e.g: 'pencil'"
137
137
  },
138
138
  "label": {
139
- "type": "string",
139
+ "$ref": "translatable.ref.json",
140
140
  "description": "e.g: 'Editar'"
141
141
  },
142
142
  "action": {
@@ -218,10 +218,10 @@
218
218
  "type": "object",
219
219
  "properties": {
220
220
  "title": {
221
- "type": "string"
221
+ "$ref": "translatable.ref.json"
222
222
  },
223
223
  "message": {
224
- "type": "string"
224
+ "$ref": "translatable.ref.json"
225
225
  }
226
226
  },
227
227
  "required": ["title", "message"]
@@ -9,7 +9,7 @@
9
9
  "type": "string"
10
10
  },
11
11
  "title": {
12
- "type": "string"
12
+ "$ref": "translatable.ref.json"
13
13
  },
14
14
  "icon": {
15
15
  "type": "string"
@@ -23,6 +23,17 @@
23
23
  "aiAgent"
24
24
  ]
25
25
  },
26
+ "languages": {
27
+ "type": "array",
28
+ "items": {
29
+ "$ref": "language.ref.json"
30
+ },
31
+ "uniqueItems": true,
32
+ "minItems": 1
33
+ },
34
+ "defaultLanguage": {
35
+ "$ref": "language.ref.json"
36
+ },
26
37
  "flows": {
27
38
  "type": "object",
28
39
  "properties": {
@@ -0,0 +1,30 @@
1
+ {
2
+ "$id": "storage-config.ref.json",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "type": "object",
5
+ "properties": {
6
+ "path": {
7
+ "type": "string",
8
+ "description": "Path prefix inside the bucket. E.g., 'public/movies/' or 'private/documents/'. The generator will determine the bucket based on the first segment ('public' or 'private')."
9
+ },
10
+ "fileNameStrategy": {
11
+ "type": "string",
12
+ "enum": [
13
+ "uuid",
14
+ "original",
15
+ "timestamp"
16
+ ]
17
+ },
18
+ "visibility": {
19
+ "type": "string",
20
+ "enum": [
21
+ "public",
22
+ "private"
23
+ ]
24
+ }
25
+ },
26
+ "required": [
27
+ "path",
28
+ "fileNameStrategy"
29
+ ]
30
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "$id": "translatable.ref.json",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "oneOf": [
5
+ { "type": "string" },
6
+ {
7
+ "type": "object",
8
+ "properties": {
9
+ "pt-BR": { "type": "string" },
10
+ "en-US": { "type": "string" },
11
+ "es-ES": { "type": "string" }
12
+ },
13
+ "additionalProperties": false,
14
+ "minProperties": 1
15
+ }
16
+ ]
17
+ }