rapida-partner 1.19.0 → 2.0.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 (92) hide show
  1. package/README.md +73 -43
  2. package/index.ts +87 -13
  3. package/package.json +2 -2
  4. package/src/controllers/ts_project_to_json_project.ts +12 -11
  5. package/src/enums/form.enum.ts +3 -0
  6. package/src/examples/components/forms/actor.form.ts +57 -5
  7. package/src/examples/components/forms/character.form.ts +6 -1
  8. package/src/examples/components/forms/company.form.ts +9 -5
  9. package/src/examples/components/forms/movie.form.ts +21 -5
  10. package/src/examples/components/forms/movieEpisode.form.ts +10 -5
  11. package/src/examples/components/forms/movieGenre.form.ts +6 -1
  12. package/src/examples/components/forms/person.form.ts +9 -14
  13. package/src/examples/components/forms/project.form.ts +295 -0
  14. package/src/examples/components/forms/taskWithProject.form.ts +310 -0
  15. package/src/examples/components/lists/actor.list.ts +15 -9
  16. package/src/examples/components/lists/character.list.ts +13 -7
  17. package/src/examples/components/lists/movie.list.ts +104 -24
  18. package/src/examples/components/lists/movieEpisode.list.ts +17 -11
  19. package/src/examples/components/lists/movieGenre.list.ts +12 -6
  20. package/src/examples/components/lists/project.list.ts +78 -0
  21. package/src/examples/components/lists/taskWithProject.list.ts +202 -0
  22. package/src/examples/components/tables/character.table.ts +40 -0
  23. package/src/examples/modules/character.ts +1 -0
  24. package/src/examples/modules/project.ts +18 -0
  25. package/src/examples/projects/assets/images/favicon/android-chrome-192x192.png +0 -0
  26. package/src/examples/projects/assets/images/favicon/android-chrome-512x512.png +0 -0
  27. package/src/examples/projects/assets/images/favicon/apple-touch-icon.png +0 -0
  28. package/src/examples/projects/assets/images/favicon/favicon-16x16.png +0 -0
  29. package/src/examples/projects/assets/images/favicon/favicon-32x32.png +0 -0
  30. package/src/examples/projects/assets/images/favicon/favicon.ico +0 -0
  31. package/src/examples/projects/assets/images/logo.png +0 -0
  32. package/src/examples/projects/movieBackoffice.ts +62 -62
  33. package/src/interfaces/ai-agent.interface.ts +179 -0
  34. package/src/interfaces/condition.interface.ts +2 -3
  35. package/src/interfaces/data-chart.interface.ts +74 -56
  36. package/src/interfaces/data-table.interface.ts +43 -0
  37. package/src/interfaces/form-array.interface.ts +1 -0
  38. package/src/interfaces/form-autocomplete.interface.ts +1 -0
  39. package/src/interfaces/form-checkbox.interface.ts +27 -0
  40. package/src/interfaces/form-contract.interface.ts +12 -2
  41. package/src/interfaces/form-file.interface.ts +1 -1
  42. package/src/interfaces/form-input.interface.ts +18 -3
  43. package/src/interfaces/form-radio.interface.ts +27 -0
  44. package/src/interfaces/form-select.interface.ts +1 -1
  45. package/src/interfaces/form.interface.ts +13 -4
  46. package/src/interfaces/kanban.interface.ts +82 -0
  47. package/src/interfaces/list.interface.ts +15 -1
  48. package/src/interfaces/notification.interface.ts +27 -0
  49. package/src/interfaces/project-backend.interface.ts +61 -2
  50. package/src/interfaces/project-repositories.interface.ts +18 -0
  51. package/src/interfaces/project-style.interface.ts +15 -96
  52. package/src/interfaces/project.interface.ts +52 -5
  53. package/src/interfaces/record-reminder.interface.ts +14 -0
  54. package/src/interfaces/trusted-caller.interface.ts +21 -0
  55. package/src/schemas/ai-agent-config.ref.json +232 -0
  56. package/src/schemas/backend.ref.json +87 -1
  57. package/src/schemas/component-one-of.ref.json +4 -1
  58. package/src/schemas/data-chart.ref.json +3 -0
  59. package/src/schemas/data-table.ref.json +24 -0
  60. package/src/schemas/form-array.ref.json +3 -0
  61. package/src/schemas/form-autocomplete.ref.json +6 -0
  62. package/src/schemas/form-checkbox.ref.json +73 -0
  63. package/src/schemas/form-contract-request.ref.json +1 -0
  64. package/src/schemas/form-contract.ref.json +2 -1
  65. package/src/schemas/form-input.ref.json +8 -2
  66. package/src/schemas/form-one-of.ref.json +4 -2
  67. package/src/schemas/form-public-contract.ref.json +16 -5
  68. package/src/schemas/form-radio.ref.json +73 -0
  69. package/src/schemas/form-switch.ref.json +3 -12
  70. package/src/schemas/form.ref.json +14 -50
  71. package/src/schemas/frontend.ref.json +26 -1
  72. package/src/schemas/kanban.ref.json +259 -0
  73. package/src/schemas/list.ref.json +65 -313
  74. package/src/schemas/module.ref.json +3 -0
  75. package/src/schemas/notification-condition.ref.json +20 -0
  76. package/src/schemas/notification-recipients.ref.json +31 -0
  77. package/src/schemas/notification.ref.json +65 -0
  78. package/src/schemas/project-repositories.ref.json +19 -0
  79. package/src/schemas/project-style.ref.json +28 -12
  80. package/src/schemas/project.schema.json +115 -4
  81. package/src/schemas/record-reminder.ref.json +41 -0
  82. package/src/schemas/send-message.ref.json +33 -0
  83. package/src/schemas/trusted-caller.ref.json +28 -0
  84. package/src/schemas/types-datatype.ref.json +1 -0
  85. package/src/utils/json.ts +3 -11
  86. package/src/utils/path.ts +22 -27
  87. package/rapidaObject.json +0 -1
  88. package/src/constants/secrets/database.ts +0 -1
  89. package/src/constants/secrets/others.ts +0 -3
  90. package/src/constants/secrets/storage.ts +0 -1
  91. package/src/schemas/project-style-theme.ref.json +0 -98
  92. package/src/utils/env.ts +0 -9
@@ -7,6 +7,7 @@ export interface IFormArray {
7
7
  name: string;
8
8
  label: string;
9
9
  elements: IFormElement[];
10
+ tooltip?: string;
10
11
  conditions?: IFormCondition;
11
12
  todo?: string;
12
13
  businessRules?: IBusinessRule[];
@@ -40,6 +40,7 @@ export interface IOptionsApi {
40
40
  isNotKunlatekResponse?: boolean;
41
41
  rawQuery?: string;
42
42
  conditions?: IFormCondition;
43
+ isExternal?: boolean;
43
44
  }
44
45
 
45
46
  export interface IApiResponseField {
@@ -0,0 +1,27 @@
1
+ // MODIFICATION BASED ON: src/interfaces/form-checkbox.interface.ts
2
+ import type { IFormCondition } from "./condition.interface";
3
+ import type { IBusinessRule } from "./project.interface";
4
+
5
+ export interface IFormCheckbox {
6
+ type: "checkbox";
7
+ name: string;
8
+ label: string;
9
+ options: ICheckboxOption[];
10
+ tooltip?: string;
11
+ isDisabled?: boolean;
12
+ isDisabledOnUpdate?: boolean;
13
+ isHidden?: boolean;
14
+ isRequired?: boolean;
15
+ conditions?: IFormCondition;
16
+ todo?: string;
17
+ businessRules?: IBusinessRule[];
18
+ elementDescription?: string;
19
+ space?: 1 | 2 | 3 | 4;
20
+ }
21
+
22
+ export interface ICheckboxOption {
23
+ label: string;
24
+ value: string | number | boolean;
25
+ isDisabled?: boolean;
26
+ isSelected?: boolean;
27
+ }
@@ -17,7 +17,17 @@ export interface IPublicContract {
17
17
  id: string;
18
18
  endpoint: string;
19
19
  actions: ("create" | "get" | "getById" | "update" | "softDelete" | "hardDelete" | "clone" | "sendEmail")[];
20
- permissionedUrls: string[];
20
+ /**
21
+ * - `"anonymous"`: sem autenticação.
22
+ * - `"trustedCallers"`: exige JWT de serviço assinado por um dos `IBackend.trustedCallers`
23
+ * do ambiente ativo (RFC 7523). Sem chamadores declarados, ninguém tem acesso.
24
+ */
25
+ access: "anonymous" | "trustedCallers";
26
+ /**
27
+ * Origens de browser/app liberadas via CORS. Só restringe browsers — não protege
28
+ * contra chamadas servidor-a-servidor (use `access: "trustedCallers"` para isso).
29
+ */
30
+ allowedOrigins?: string[];
21
31
  request?: IContractRequest;
22
32
  conditions?: IFormCondition;
23
33
  businessRules?: IBusinessRule[];
@@ -63,7 +73,7 @@ export interface IContractRequestField {
63
73
  interface IContractRequestFieldForeignKey {
64
74
  entity: string;
65
75
  connectionAttribute: string;
66
- relationship: "many-to-many" | "one-to-many" | "one-to-one"
76
+ relationship: "many-to-many" | "one-to-many" | "one-to-one" | "many-to-one";
67
77
  fields?: IContractRequestField[];
68
78
  isHidden?: boolean;
69
79
  }
@@ -2,7 +2,7 @@ import type { EDataType } from "../enums/form.enum";
2
2
  import type { IFormCondition } from "./condition.interface";
3
3
  import type { IBusinessRule } from "./project.interface";
4
4
 
5
- interface IStorageConfig {
5
+ export interface IStorageConfig {
6
6
  path: string;
7
7
  fileNameStrategy: "uuid" | "original" | "timestamp";
8
8
  visibility: "public" | "private";
@@ -5,11 +5,11 @@ import type {
5
5
  IApiResponseFieldFilter,
6
6
  } from "./form-autocomplete.interface";
7
7
  import type { IBusinessRule } from "./project.interface";
8
+ import type { IStorageConfig } from "./form-file.interface";
8
9
 
9
- export interface IFormInput {
10
+ interface IFormInputBase {
10
11
  type: "input";
11
12
  name: string;
12
- dataType: EDataType;
13
13
  label: string;
14
14
  placeholder?: string;
15
15
  tooltip?: string;
@@ -26,7 +26,7 @@ export interface IFormInput {
26
26
  minLength?: number;
27
27
  apiRequest?: IApiRequest;
28
28
  businessRules?: IBusinessRule[];
29
- maskRegex?: string;
29
+ mask?: string | string[];
30
30
  suffix?: string;
31
31
  prefix?: string;
32
32
  defaultValue?: string | number | boolean;
@@ -34,6 +34,21 @@ export interface IFormInput {
34
34
  space?: 1 | 2 | 3 | 4;
35
35
  }
36
36
 
37
+ // dataType: "wysiwyg" sobe imagens embutidas no editor via upload real (não
38
+ // base64): storageConfig é obrigatório aqui para o gerador saber path/
39
+ // fileNameStrategy/visibility do endpoint de upload inline usado pelo editor.
40
+ export interface IFormInputWysiwyg extends IFormInputBase {
41
+ dataType: EDataType.WYSIWYG;
42
+ storageConfig: IStorageConfig;
43
+ }
44
+
45
+ export interface IFormInputOther extends IFormInputBase {
46
+ dataType: Exclude<EDataType, EDataType.WYSIWYG>;
47
+ storageConfig?: undefined;
48
+ }
49
+
50
+ export type IFormInput = IFormInputWysiwyg | IFormInputOther;
51
+
37
52
  export interface IApiRequest {
38
53
  endpoint: string;
39
54
  paramType: "query" | "path";
@@ -0,0 +1,27 @@
1
+ // MODIFICATION BASED ON: src/interfaces/form-radio.interface.ts
2
+ import type { IFormCondition } from "./condition.interface";
3
+ import type { IBusinessRule } from "./project.interface";
4
+
5
+ export interface IFormRadio {
6
+ type: "radio";
7
+ name: string;
8
+ label: string;
9
+ options: IRadioOption[];
10
+ tooltip?: string;
11
+ isDisabled?: boolean;
12
+ isDisabledOnUpdate?: boolean;
13
+ isHidden?: boolean;
14
+ isRequired?: boolean;
15
+ conditions?: IFormCondition;
16
+ todo?: string;
17
+ businessRules?: IBusinessRule[];
18
+ elementDescription?: string;
19
+ space?: 1 | 2 | 3 | 4;
20
+ }
21
+
22
+ export interface IRadioOption {
23
+ label: string;
24
+ value: string | number | boolean;
25
+ isDisabled?: boolean;
26
+ isSelected?: boolean;
27
+ }
@@ -27,7 +27,7 @@ export interface IFormSelect {
27
27
  space?: 1 | 2 | 3 | 4;
28
28
  }
29
29
 
30
- interface ISelectOption {
30
+ export interface ISelectOption {
31
31
  label: string;
32
32
  value: string | number | boolean;
33
33
  isDisabled?: boolean;
@@ -1,22 +1,27 @@
1
1
  import type { IFormArray } from "./form-array.interface";
2
2
  import type { IFormAutocomplete } from "./form-autocomplete.interface";
3
3
  import type { IFormButton } from "./form-button.interface";
4
+ import type { IFormCheckbox } from "./form-checkbox.interface";
4
5
  import type { IFormDatePicker } from "./form-datepicker.interface";
5
6
  import type { IFormFieldset } from "./form-fieldset.interface";
6
7
  import type { IFormFile } from "./form-file.interface";
7
8
  import type { IFormInheritance } from "./form-inheritance.interface";
8
9
  import type { IFormInput } from "./form-input.interface";
10
+ import type { IFormRadio } from "./form-radio.interface";
9
11
  import type { IFormSelect } from "./form-select.interface";
12
+ import type { IFormSwitch } from "./form-switch.interface";
10
13
  import type { IFormTab } from "./form-tab.interface";
11
14
  import type { IBusinessRule } from "./project.interface";
12
15
  import type { IFlowChart } from "./form-flowchart.interface";
13
16
  import type { IContract, IPublicContract } from "./form-contract.interface";
17
+ import type { IRecordReminder } from "./record-reminder.interface";
14
18
 
15
19
  export interface IForm {
16
20
  componentType: "form";
17
21
  id: string;
18
22
  title: string;
19
23
  elements: IFormElement[];
24
+ subtitle?: string;
20
25
  icon?: string;
21
26
  guards?: "isAuthenticated" | "isAuthorized";
22
27
  businessRules?: IBusinessRule[];
@@ -29,11 +34,12 @@ export interface IForm {
29
34
  actions: "create" | "update" | "delete";
30
35
  to: {
31
36
  field: string;
32
- property?: string; // if field is a property of a related object else take the value of the field. e.g.: field.property
37
+ property?: string;
33
38
  };
34
- subject?: string; // use mustache syntax to insert values. e.g.: {{field}}
35
- message: string; // use mustache syntax to insert values. e.g.: {{field}}
39
+ subject?: string;
40
+ message: string;
36
41
  }[];
42
+ reminders?: IRecordReminder[];
37
43
  }
38
44
 
39
45
  export type IFormElement =
@@ -46,4 +52,7 @@ export type IFormElement =
46
52
  | IFormButton
47
53
  | IFormFile
48
54
  | IFormDatePicker
49
- | IFormInheritance;
55
+ | IFormInheritance
56
+ | IFormCheckbox
57
+ | IFormRadio
58
+ | IFormSwitch;
@@ -0,0 +1,82 @@
1
+ import type { EDataType } from "../enums/form.enum";
2
+ import type { IFormCondition } from "./condition.interface";
3
+ import type { IFormAutocomplete } from "./form-autocomplete.interface";
4
+ import type { IContract, IPublicContract } from "./form-contract.interface";
5
+ import type { IApiRequest } from "./form-input.interface";
6
+ import type { IFormSelect } from "./form-select.interface";
7
+ import type { IFormElement } from "./form.interface";
8
+ import type { IBusinessRule } from "./project.interface";
9
+
10
+ export interface IKanban {
11
+ componentType: "kanban";
12
+ id: string;
13
+ relatedFormId?: string; // <-- NOVO: ID do formulário relacionado para criar/editar cards
14
+ boardsProperty: IFormAutocomplete;
15
+ userStory?: string;
16
+ guards?: string[];
17
+ dataSource: IApiRequest;
18
+ kanbanColumnsProperty: IFormAutocomplete | IFormSelect;
19
+ businessRules?: IBusinessRule[];
20
+ kanbanCardItems: {
21
+ property?: string;
22
+ label?: string;
23
+ type?:
24
+ | "title"
25
+ | "subtitle"
26
+ | "description"
27
+ | "video"
28
+ | "image"
29
+ | "images"
30
+ | "icon"
31
+ | "badge"
32
+ | "editable";
33
+ isHtml?: boolean;
34
+ isTimestamp?: boolean;
35
+ callToAction?: {
36
+ link: string;
37
+ usePropertyAsQuery?: boolean;
38
+ };
39
+ dataType: EDataType;
40
+ isExpansible?: boolean;
41
+ conditions?: IFormCondition;
42
+ businessRules?: IBusinessRule[];
43
+ todo?: string;
44
+ }[];
45
+ kanbanFilters?: IFormElement[];
46
+ callsToActionMenu?: {
47
+ icon: string;
48
+ label: string;
49
+ action: {
50
+ linkAfterAction?: {
51
+ endpoint: string;
52
+ propertiesAsQueryParam?: string[];
53
+ propertiesAsPathParam?: string[];
54
+ };
55
+ link?: {
56
+ endpoint: string;
57
+ propertiesAsQueryParam?: string[];
58
+ propertiesAsPathParam?: string[];
59
+ };
60
+ request?: {
61
+ endpoint: string;
62
+ propertiesAsQueryParam?: string[];
63
+ propertiesAsPathParam?: string[];
64
+ verb: "get" | "post" | "put" | "softDelete" | "hardDelete";
65
+ dialog?: {
66
+ title: string;
67
+ message: string;
68
+ };
69
+ };
70
+ };
71
+ businessRules?: IBusinessRule[];
72
+ conditions?: IFormCondition;
73
+ todo?: string;
74
+ }[];
75
+ contracts: IContract[];
76
+ publicContracts?: IPublicContract[];
77
+ archive?: {
78
+ property: string;
79
+ value: string;
80
+ logicalOperator?: "&&" | "!" | "nor" | "||";
81
+ }[];
82
+ }
@@ -51,12 +51,18 @@ export interface IList {
51
51
  icon: string; // Material icons e.g: "pencil"
52
52
  label: string; // e.g: "Editar"
53
53
  action: {
54
- link: {
54
+ linkAfterAction?: {
55
55
  // frontend url to be redirected on action completition
56
56
  endpoint: string; // e.g.: "/user"
57
57
  propertiesAsQueryParam?: string[]; // if, for example, ["_id", "email"], then "/user?_id=value&email=value"
58
58
  propertiesAsPathParam?: string[]; // if, for example, ["_id", "email"], then "/user/<_id>/<email>"
59
59
  };
60
+ link?: {
61
+ // frontend url to be redirected on action completition
62
+ endpoint: string; // e.g.: "/user"
63
+ propertiesAsQueryParam?: string[]; // if, for example, ["_id", "email"], then "/user?_id=value&email=value"
64
+ propertiesAsPathParam?: string[]; // if, for example, ["_id", "email"], then "/user/<_id>/<email>"
65
+ },
60
66
  request?: {
61
67
  // backend request endpoint that must be processed before link redirection
62
68
  endpoint: string; // e.g.: "/user"
@@ -80,4 +86,12 @@ export interface IList {
80
86
  value: string; // e.g.: "finished"
81
87
  logicalOperator?: "&&" | "!" | "nor" | "||"; // && as default
82
88
  }[];
89
+ pagination?: IListPagination;
83
90
  }
91
+
92
+ export interface IListPagination {
93
+ enabled: boolean;
94
+ pageSize: number;
95
+ pageSizeOptions?: number[];
96
+ position?: "top" | "bottom" | "both";
97
+ }
@@ -0,0 +1,27 @@
1
+ export type INotificationRecipients =
2
+ | "allUsers"
3
+ | { field: string; property?: string } // valor do destinatário vem de um campo do registro recebido (mesmo formato de IForm.sendMessage.to)
4
+ | { role: string };
5
+
6
+ export interface INotification {
7
+ id: string;
8
+ title: string; // texto exibido na central de notificações, fixo (não interpolado)
9
+ message: string; // corpo da notificação; suporta {{campo}} interpolado a partir do registro que bateu a condição
10
+ source: {
11
+ type: "internal" | "external";
12
+ internal?: { contractId: string }; // referencia IContract.id/IPublicContract.id já declarado em algum IForm
13
+ external?: { endpoint: string }; // URL completa, fora do backend gerado por este projeto
14
+ };
15
+ condition: INotificationCondition[]; // sempre avaliado contra o payload recebido (resposta do poll ou corpo do webhook), nunca usado para montar a request
16
+ recipients: INotificationRecipients;
17
+ removeAfterWatch?: boolean;
18
+ isFromUser?: boolean; // Whether the notification is from a user action or not. If not, it is from the system.
19
+ isWebhook?: boolean; // Whether the notification is a webhook or not.
20
+ }
21
+
22
+ export interface INotificationCondition {
23
+ field: string; // path dentro do JSON recebido
24
+ value: string;
25
+ comparisonOperator: "===" | ">" | ">=" | "in" | "<" | "<=" | "!==" | "nin";
26
+ logicalOperator?: "&&" | "!" | "nor" | "||";
27
+ }
@@ -1,3 +1,7 @@
1
+ import type { IFormAutocomplete } from "./form-autocomplete.interface";
2
+ import type { IList } from "./list.interface";
3
+ import type { ITrustedCaller } from "./trusted-caller.interface";
4
+
1
5
  interface IDatabase {
2
6
  provider:
3
7
  | "mariadb"
@@ -5,6 +9,7 @@ interface IDatabase {
5
9
  | "oracle"
6
10
  | "postgresql"
7
11
  | "mysql"
12
+ | "sqlite"
8
13
  | "sqlserver";
9
14
  connectionString: string;
10
15
  credentials: {
@@ -31,18 +36,72 @@ interface ILogging {
31
36
  discordWebhookUrl?: string;
32
37
  }
33
38
 
39
+ interface IWhatsapp {
40
+ whatsappToken: string;
41
+ whatsappPhoneNumberId: string;
42
+ whatsappVerifyToken: string;
43
+ whatsappBusinessAccountId: string;
44
+ whatsappAppSecret?: string;
45
+ }
46
+
34
47
  interface IEmail {
35
48
  smtpUser?: string;
36
49
  smtpPass?: string;
37
50
  smtpFrom?: string;
38
51
  }
39
52
 
53
+ interface IMarketplace {
54
+ paymentGateways: IPaymentGateway[];
55
+ productsAutocomplete: IFormAutocomplete;
56
+ stockInEndpoint: string;
57
+ stockOutEndpoint: string;
58
+ productBaseUrl: string;
59
+ }
60
+
61
+ interface IService {
62
+ paymentGateways: IPaymentGateway[];
63
+ appointmentList: IList;
64
+ availabilityScheduleList: IList;
65
+ appointmentByAiList?: IList;
66
+ }
67
+
68
+ export interface IPaymentGateway {
69
+ provider: "mercadoPago" | "pagSeguro" | "unionPay";
70
+ }
71
+
40
72
  export interface IBackend {
73
+ environment: string;
74
+ baseUrl: string;
75
+ isActiveEnvironment: boolean;
41
76
  framework: "functions" | "lambda" | "laravel" | "nest" | "dotnet";
42
77
  database: IDatabase;
43
78
  jwtSecret: string;
44
- baseUrl?: string;
79
+ trustedCallers?: ITrustedCaller[];
45
80
  storage?: IStorage;
46
81
  logging?: ILogging;
82
+ whatsapp?: IWhatsapp;
47
83
  email?: IEmail;
48
- }
84
+ marketplace?: IMarketplace;
85
+ service?: IService;
86
+ mercadoPagoIntegration?: {
87
+ publicKey?: string;
88
+ accessToken?: string;
89
+ appId?: string;
90
+ userId?: string;
91
+ testUserId?: string;
92
+ password?: string;
93
+ verificationCode?: string;
94
+ testSellerSettings?: {
95
+ userId: string;
96
+ user: string;
97
+ password: string;
98
+ verificationCode: string;
99
+ };
100
+ testBuyerSettings?: {
101
+ userId: string;
102
+ user: string;
103
+ password: string;
104
+ verificationCode: string;
105
+ };
106
+ };
107
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Repositórios git (GitHub, no formato `owner/repo`) que recebem o código gerado
3
+ * deste projeto — o destino do fluxo gerar → copiar → commitar → push na branch
4
+ * `rapida` → PR para `develop`.
5
+ *
6
+ * Um repositório por tipo de artefato gerado (não por ambiente): os ambientes
7
+ * (`IFrontend`/`IBackend`) mudam URLs e credenciais, mas o código vai sempre
8
+ * para o mesmo repositório, e o ambiente implantado é decidido pelo CI/CD dele
9
+ * (ex.: `develop` → homolog, release → produção).
10
+ */
11
+ export interface IProjectRepositories {
12
+ /** Ex.: `kunlatek/administrado-36899179000108`. */
13
+ frontend?: string;
14
+ /** Ex.: `kunlatek/administrado-36899179000108-api`. */
15
+ backend?: string;
16
+ /** Repositório do agente de IA gerado (`skeleton: "aiAgent"`). */
17
+ aiAgent?: string;
18
+ }
@@ -1,129 +1,48 @@
1
1
  /**
2
2
  * Defines the color palette for a theme.
3
- * Includes primary, secondary, tertiary, and status colors.
3
+ * Scope intentionally limited to the fields actually consumed today by
4
+ * ThemeService.applyCustomTheme in rapida-code-generator — see
5
+ * docs/architecture-review-2026-08-20.md, achado A/B.
4
6
  */
5
- interface IColorPalette {
7
+ export interface IColorPalette {
6
8
  primary?: string;
7
9
  primaryContrast?: string;
8
10
  secondary?: string;
9
11
  secondaryContrast?: string;
10
- tertiary?: string;
11
- tertiaryContrast?: string;
12
- quaternary?: string;
13
- quaternaryContrast?: string;
14
12
  background?: string;
15
13
  error?: string;
16
14
  success?: string;
17
- warning?: string;
18
- info?: string;
19
- }
20
-
21
- /**
22
- * Defines typography styles for a theme.
23
- */
24
- interface ITypography {
25
- fontFamily?: string;
26
- fontSize?: string;
27
15
  }
28
16
 
29
17
  /**
30
18
  * Defines border styles for a theme.
31
19
  */
32
- interface IBorders {
33
- radius?: string;
34
- }
35
-
36
- /**
37
- * Defines shadow styles for a theme.
38
- */
39
- interface IShadows {
40
- boxShadow?: string;
41
- }
42
-
43
- /**
44
- * Defines styles for form input elements.
45
- */
46
- interface IInputStyles {
47
- background?: string;
48
- text?: string;
49
- border?: string;
50
- borderRadius?: string;
51
- focusBorder?: string;
52
- placeholder?: string;
53
- width?: string;
54
- }
55
-
56
- /**
57
- * Defines styles for button elements.
58
- */
59
- interface IButtonStyles {
60
- background?: string;
61
- text?: string;
62
- border?: string;
20
+ export interface IBorders {
63
21
  borderRadius?: string;
64
- hoverBackground?: string;
65
- hoverText?: string;
66
- hoverBorder?: string;
67
- disabledBackground?: string;
68
- disabledText?: string;
69
- disabledBorder?: string;
70
22
  }
71
23
 
72
24
  /**
73
- * Defines styles for label elements.
25
+ * Defines typography for a theme.
74
26
  */
75
- interface ILabelStyles {
76
- text?: string;
27
+ export interface ITypography {
28
+ fontFamily?: string;
77
29
  fontSize?: string;
78
- fontWeight?: string;
79
- }
80
-
81
- /**
82
- * Defines styles for fieldset elements.
83
- */
84
- interface IFieldsetStyles {
85
- border?: string;
86
- borderRadius?: string;
87
- legendText?: string;
88
- legendFontSize?: string;
89
- legendFontWeight?: string;
90
30
  }
91
31
 
92
32
  /**
93
- * Groups all component-specific styles.
33
+ * Defines shadow styles for a theme.
94
34
  */
95
- interface IComponentStyles {
96
- input?: IInputStyles;
97
- button?: IButtonStyles;
98
- label?: ILabelStyles;
99
- fieldset?: IFieldsetStyles;
35
+ export interface IShadows {
36
+ boxShadow?: string;
100
37
  }
101
38
 
102
39
  /**
103
- * Represents a complete theme definition, combining palette, typography,
104
- * and component-specific styles.
40
+ * Defines the style structure for the entire project.
105
41
  */
106
- interface ITheme {
42
+ export interface IStyle {
43
+ themeName: string;
107
44
  colors?: IColorPalette;
108
- typography?: ITypography;
109
45
  borders?: IBorders;
46
+ typography?: ITypography;
110
47
  shadows?: IShadows;
111
- spacing?: string;
112
- maxWidth?: string;
113
- headerHeight?: string;
114
- footerHeight?: string;
115
- components?: IComponentStyles;
116
48
  }
117
-
118
- /**
119
- * Defines the style structure for the entire project, allowing for
120
- * different themes to be applied to different layout sections.
121
- */
122
- export interface IStyle {
123
- themeName: string;
124
- overall?: ITheme;
125
- main?: ITheme;
126
- navBar?: ITheme;
127
- sideBar?: ITheme;
128
- footer?: ITheme;
129
- }