specialist-agent 1.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.
- package/LICENSE +21 -0
- package/README.md +346 -0
- package/agents/cloud-lite.md +44 -0
- package/agents/cloud.md +122 -0
- package/agents/data-lite.md +44 -0
- package/agents/data.md +136 -0
- package/agents/designer-lite.md +44 -0
- package/agents/designer.md +126 -0
- package/agents/devops-lite.md +44 -0
- package/agents/devops.md +131 -0
- package/agents/finance-lite.md +43 -0
- package/agents/finance.md +108 -0
- package/agents/security-lite.md +43 -0
- package/agents/security.md +123 -0
- package/agents/starter-lite.md +49 -0
- package/agents/starter.md +200 -0
- package/agents/tester-lite.md +48 -0
- package/agents/tester.md +142 -0
- package/cli/index.mjs +232 -0
- package/package.json +45 -0
- package/packs/nextjs/ARCHITECTURE.md +1033 -0
- package/packs/nextjs/CLAUDE.md +70 -0
- package/packs/nextjs/agents/builder.md +145 -0
- package/packs/nextjs/agents/doctor.md +152 -0
- package/packs/nextjs/agents/migrator.md +203 -0
- package/packs/nextjs/agents/reviewer.md +141 -0
- package/packs/nextjs/agents-lite/builder.md +51 -0
- package/packs/nextjs/agents-lite/doctor.md +51 -0
- package/packs/nextjs/agents-lite/migrator.md +52 -0
- package/packs/nextjs/agents-lite/reviewer.md +51 -0
- package/packs/nextjs/skills/dev-create-component/SKILL.md +82 -0
- package/packs/nextjs/skills/dev-create-hook/SKILL.md +90 -0
- package/packs/nextjs/skills/dev-create-module/SKILL.md +63 -0
- package/packs/nextjs/skills/dev-create-service/SKILL.md +35 -0
- package/packs/nextjs/skills/dev-create-test/SKILL.md +106 -0
- package/packs/nextjs/skills/dev-generate-types/SKILL.md +37 -0
- package/packs/nextjs/skills/docs-onboard/SKILL.md +55 -0
- package/packs/nextjs/skills/migration-migrate-component/SKILL.md +58 -0
- package/packs/nextjs/skills/migration-migrate-module/SKILL.md +25 -0
- package/packs/nextjs/skills/review-check-architecture/SKILL.md +101 -0
- package/packs/nextjs/skills/review-fix-violations/SKILL.md +48 -0
- package/packs/nextjs/skills/review-review/SKILL.md +46 -0
- package/packs/react/ARCHITECTURE.md +991 -0
- package/packs/react/CLAUDE.md +66 -0
- package/packs/react/agents/builder.md +74 -0
- package/packs/react/agents/doctor.md +100 -0
- package/packs/react/agents/migrator.md +114 -0
- package/packs/react/agents/reviewer.md +116 -0
- package/packs/react/agents-lite/builder.md +42 -0
- package/packs/react/agents-lite/doctor.md +41 -0
- package/packs/react/agents-lite/migrator.md +51 -0
- package/packs/react/agents-lite/reviewer.md +47 -0
- package/packs/react/skills/dev-create-component/SKILL.md +53 -0
- package/packs/react/skills/dev-create-hook/SKILL.md +78 -0
- package/packs/react/skills/dev-create-module/SKILL.md +51 -0
- package/packs/react/skills/dev-create-service/SKILL.md +34 -0
- package/packs/react/skills/dev-create-test/SKILL.md +92 -0
- package/packs/react/skills/dev-generate-types/SKILL.md +37 -0
- package/packs/react/skills/docs-onboard/SKILL.md +42 -0
- package/packs/react/skills/migration-migrate-component/SKILL.md +44 -0
- package/packs/react/skills/migration-migrate-module/SKILL.md +25 -0
- package/packs/react/skills/review-check-architecture/SKILL.md +73 -0
- package/packs/react/skills/review-fix-violations/SKILL.md +45 -0
- package/packs/react/skills/review-review/SKILL.md +43 -0
- package/packs/svelte/ARCHITECTURE.md +975 -0
- package/packs/svelte/CLAUDE.md +66 -0
- package/packs/svelte/agents/builder.md +80 -0
- package/packs/svelte/agents/doctor.md +100 -0
- package/packs/svelte/agents/migrator.md +128 -0
- package/packs/svelte/agents/reviewer.md +104 -0
- package/packs/svelte/agents-lite/builder.md +43 -0
- package/packs/svelte/agents-lite/doctor.md +44 -0
- package/packs/svelte/agents-lite/migrator.md +59 -0
- package/packs/svelte/agents-lite/reviewer.md +48 -0
- package/packs/svelte/skills/dev-create-component/SKILL.md +77 -0
- package/packs/svelte/skills/dev-create-module/SKILL.md +59 -0
- package/packs/svelte/skills/dev-create-service/SKILL.md +35 -0
- package/packs/svelte/skills/dev-create-store/SKILL.md +94 -0
- package/packs/svelte/skills/dev-create-test/SKILL.md +98 -0
- package/packs/svelte/skills/dev-generate-types/SKILL.md +37 -0
- package/packs/svelte/skills/docs-onboard/SKILL.md +47 -0
- package/packs/svelte/skills/migration-migrate-component/SKILL.md +51 -0
- package/packs/svelte/skills/migration-migrate-module/SKILL.md +25 -0
- package/packs/svelte/skills/review-check-architecture/SKILL.md +79 -0
- package/packs/svelte/skills/review-fix-violations/SKILL.md +47 -0
- package/packs/svelte/skills/review-review/SKILL.md +44 -0
- package/packs/vue/ARCHITECTURE.md +798 -0
- package/packs/vue/CLAUDE.md +66 -0
- package/packs/vue/agents/builder.md +73 -0
- package/packs/vue/agents/doctor.md +82 -0
- package/packs/vue/agents/migrator.md +101 -0
- package/packs/vue/agents/reviewer.md +92 -0
- package/packs/vue/agents-lite/builder.md +42 -0
- package/packs/vue/agents-lite/doctor.md +40 -0
- package/packs/vue/agents-lite/migrator.md +50 -0
- package/packs/vue/agents-lite/reviewer.md +46 -0
- package/packs/vue/skills/dev-create-component/SKILL.md +58 -0
- package/packs/vue/skills/dev-create-composable/SKILL.md +31 -0
- package/packs/vue/skills/dev-create-module/SKILL.md +50 -0
- package/packs/vue/skills/dev-create-service/SKILL.md +34 -0
- package/packs/vue/skills/dev-create-test/SKILL.md +62 -0
- package/packs/vue/skills/dev-generate-types/SKILL.md +37 -0
- package/packs/vue/skills/docs-onboard/SKILL.md +42 -0
- package/packs/vue/skills/migration-migrate-component/SKILL.md +41 -0
- package/packs/vue/skills/migration-migrate-module/SKILL.md +25 -0
- package/packs/vue/skills/review-check-architecture/SKILL.md +73 -0
- package/packs/vue/skills/review-fix-violations/SKILL.md +42 -0
- package/packs/vue/skills/review-review/SKILL.md +42 -0
|
@@ -0,0 +1,798 @@
|
|
|
1
|
+
# 🏛️ ARCHITECTURE.md – Guia de Arquitetura e Padrões
|
|
2
|
+
|
|
3
|
+
> Este documento é a **source of truth** para todos os subagentes de migração.
|
|
4
|
+
> Qualquer decisão arquitetural deve estar documentada aqui.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 1. Visão Geral
|
|
9
|
+
|
|
10
|
+
Estamos migrando um projeto Vue 3 legado (JavaScript, Options API, arquitetura caótica) para uma arquitetura moderna, tipada e modular:
|
|
11
|
+
|
|
12
|
+
| De | Para |
|
|
13
|
+
|----|------|
|
|
14
|
+
| JavaScript | TypeScript (strict) |
|
|
15
|
+
| Options API | `<script setup lang="ts">` |
|
|
16
|
+
| Props drilling | Component Composition + provide/inject |
|
|
17
|
+
| Fetch manual / Axios direto | Services + Adapters + TanStack Vue Query |
|
|
18
|
+
| Estado global desorganizado | Pinia (client state) + Vue Query (server state) |
|
|
19
|
+
| try/catch espalhados | Error handling centralizado em composables/queries |
|
|
20
|
+
| Estrutura por tipo | Arquitetura modular por feature |
|
|
21
|
+
| Naming inconsistente | Convenções rígidas documentadas |
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 2. Estrutura de Diretórios (Arquitetura Modular)
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
src/
|
|
29
|
+
├── app/ # Shell da aplicação
|
|
30
|
+
│ ├── App.vue
|
|
31
|
+
│ ├── main.ts
|
|
32
|
+
│ ├── router/
|
|
33
|
+
│ │ ├── index.ts
|
|
34
|
+
│ │ └── guards/
|
|
35
|
+
│ └── plugins/ # Registra Pinia, VueQuery, i18n, etc.
|
|
36
|
+
│
|
|
37
|
+
├── modules/ # 🔑 Feature modules (bounded contexts)
|
|
38
|
+
│ ├── auth/
|
|
39
|
+
│ │ ├── components/
|
|
40
|
+
│ │ ├── composables/
|
|
41
|
+
│ │ ├── services/
|
|
42
|
+
│ │ ├── adapters/
|
|
43
|
+
│ │ ├── stores/
|
|
44
|
+
│ │ ├── types/
|
|
45
|
+
│ │ ├── views/
|
|
46
|
+
│ │ ├── __tests__/
|
|
47
|
+
│ │ └── index.ts # Barrel export (API pública do módulo)
|
|
48
|
+
│ │
|
|
49
|
+
│ ├── marketplace/
|
|
50
|
+
│ │ ├── components/
|
|
51
|
+
│ │ │ ├── MarketplaceList.vue
|
|
52
|
+
│ │ │ ├── MarketplaceCard.vue
|
|
53
|
+
│ │ │ ├── MarketplaceFilters.vue
|
|
54
|
+
│ │ │ └── marketplace-card/ # Sub-components se necessário
|
|
55
|
+
│ │ │ ├── MarketplaceCardHeader.vue
|
|
56
|
+
│ │ │ └── MarketplaceCardActions.vue
|
|
57
|
+
│ │ ├── composables/
|
|
58
|
+
│ │ │ ├── useMarketplaceList.ts
|
|
59
|
+
│ │ │ └── useMarketplaceFilters.ts
|
|
60
|
+
│ │ ├── services/
|
|
61
|
+
│ │ │ └── marketplace-service.ts
|
|
62
|
+
│ │ ├── adapters/
|
|
63
|
+
│ │ │ └── marketplace-adapter.ts
|
|
64
|
+
│ │ ├── stores/
|
|
65
|
+
│ │ │ └── marketplace-store.ts # Só client state (filtros, UI)
|
|
66
|
+
│ │ ├── types/
|
|
67
|
+
│ │ │ ├── marketplace.types.ts
|
|
68
|
+
│ │ │ └── marketplace.contracts.ts # Schemas Zod
|
|
69
|
+
│ │ ├── views/
|
|
70
|
+
│ │ │ └── MarketplaceView.vue
|
|
71
|
+
│ │ ├── __tests__/
|
|
72
|
+
│ │ └── index.ts
|
|
73
|
+
│ │
|
|
74
|
+
│ └── [outro-modulo]/
|
|
75
|
+
│
|
|
76
|
+
├── shared/ # Compartilhado entre módulos
|
|
77
|
+
│ ├── components/ # Componentes genéricos (Button, Modal, Table)
|
|
78
|
+
│ ├── composables/ # Lógica compartilhada
|
|
79
|
+
│ ├── services/ # API client base, interceptors
|
|
80
|
+
│ ├── adapters/ # Adapters compartilhados
|
|
81
|
+
│ ├── types/ # Types globais
|
|
82
|
+
│ ├── utils/ # Funções puras sem side effects
|
|
83
|
+
│ ├── helpers/ # Funções com side effects ou DOM
|
|
84
|
+
│ ├── constants/ # Valores estáticos
|
|
85
|
+
│ └── plugins/ # Vue plugins customizados
|
|
86
|
+
│
|
|
87
|
+
└── assets/ # Estáticos (imagens, fonts, global CSS)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Regras de Importação entre Camadas
|
|
91
|
+
```
|
|
92
|
+
modules/auth ←→ shared/ ✅ Módulo importa de shared
|
|
93
|
+
modules/auth → modules/market ❌ Módulo NÃO importa de outro módulo
|
|
94
|
+
shared/ → modules/auth ❌ Shared NÃO importa de módulos
|
|
95
|
+
app/ → modules/* ✅ App importa módulos (router, registros)
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Se dois módulos precisam compartilhar algo → mover para `shared/`.
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## 3. Nomenclatura
|
|
103
|
+
|
|
104
|
+
### Arquivos e Diretórios
|
|
105
|
+
|
|
106
|
+
| Tipo | Padrão | Exemplo |
|
|
107
|
+
|------|--------|---------|
|
|
108
|
+
| Diretórios | `kebab-case` | `user-settings/` |
|
|
109
|
+
| Componentes Vue | `PascalCase.vue` | `UserSettingsForm.vue` |
|
|
110
|
+
| Views (páginas) | `PascalCase + View.vue` | `MarketplaceView.vue` |
|
|
111
|
+
| Composables | `use + PascalCase.ts` | `useMarketplaceList.ts` |
|
|
112
|
+
| Services | `kebab-case-service.ts` | `marketplace-service.ts` |
|
|
113
|
+
| Adapters | `kebab-case-adapter.ts` | `marketplace-adapter.ts` |
|
|
114
|
+
| Stores Pinia | `kebab-case-store.ts` | `marketplace-store.ts` |
|
|
115
|
+
| Types | `kebab-case.types.ts` | `marketplace.types.ts` |
|
|
116
|
+
| Contracts/Schemas | `kebab-case.contracts.ts` | `marketplace.contracts.ts` |
|
|
117
|
+
| Utils | `kebab-case.ts` | `format-date.ts` |
|
|
118
|
+
| Helpers | `kebab-case.ts` | `clipboard-helper.ts` |
|
|
119
|
+
| Testes | `NomeOriginal.spec.ts` | `MarketplaceList.spec.ts` |
|
|
120
|
+
| Constants | `kebab-case.constants.ts` | `api-endpoints.constants.ts` |
|
|
121
|
+
|
|
122
|
+
### Código
|
|
123
|
+
|
|
124
|
+
| Tipo | Padrão | Exemplo |
|
|
125
|
+
|------|--------|---------|
|
|
126
|
+
| Variáveis / funções | `camelCase` | `getUserById`, `isLoading` |
|
|
127
|
+
| Types / Interfaces | `PascalCase` | `UserProfile`, `MarketplaceItem` |
|
|
128
|
+
| Enums | `PascalCase` | `UserRole.Admin` |
|
|
129
|
+
| Constantes | `UPPER_SNAKE_CASE` | `API_BASE_URL`, `MAX_RETRIES` |
|
|
130
|
+
| Composables | `use` + `PascalCase` | `useAuth`, `useMarketplaceList` |
|
|
131
|
+
| Store IDs | `kebab-case` string | `defineStore('marketplace', ...)` |
|
|
132
|
+
| Query Keys | `camelCase` array | `['marketplace', 'list', { page }]` |
|
|
133
|
+
| Event handlers | `handle` + ação | `handleSubmit`, `handleDelete` |
|
|
134
|
+
| Boolean | `is`/`has`/`can`/`should` | `isLoading`, `hasPermission` |
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## 4. Camadas de Responsabilidade
|
|
139
|
+
|
|
140
|
+
### 4.1 Services — Requisições Puras
|
|
141
|
+
|
|
142
|
+
Services fazem **apenas** a request HTTP. Sem try/catch, sem transformação, sem lógica de negócio.
|
|
143
|
+
|
|
144
|
+
```typescript
|
|
145
|
+
// services/marketplace-service.ts
|
|
146
|
+
import { api } from '@/shared/services/api-client'
|
|
147
|
+
import type { MarketplaceListResponse, MarketplaceItemResponse } from '../types/marketplace.types'
|
|
148
|
+
|
|
149
|
+
export const marketplaceService = {
|
|
150
|
+
list(params: { page: number; pageSize: number; search?: string }) {
|
|
151
|
+
return api.get<MarketplaceListResponse>('/marketplace', { params })
|
|
152
|
+
},
|
|
153
|
+
|
|
154
|
+
getById(id: string) {
|
|
155
|
+
return api.get<MarketplaceItemResponse>(`/marketplace/${id}`)
|
|
156
|
+
},
|
|
157
|
+
|
|
158
|
+
create(payload: CreateMarketplacePayload) {
|
|
159
|
+
return api.post<MarketplaceItemResponse>('/marketplace', payload)
|
|
160
|
+
},
|
|
161
|
+
|
|
162
|
+
delete(id: string) {
|
|
163
|
+
return api.delete(`/marketplace/${id}`)
|
|
164
|
+
},
|
|
165
|
+
}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
**Regras de Service:**
|
|
169
|
+
- ❌ Sem try/catch (quem chama trata o erro)
|
|
170
|
+
- ❌ Sem transformação de dados (adapter faz isso)
|
|
171
|
+
- ❌ Sem lógica de negócio
|
|
172
|
+
- ❌ Sem acesso a store ou composables
|
|
173
|
+
- ✅ Apenas chamadas HTTP com tipagem de request/response
|
|
174
|
+
- ✅ Um arquivo por domínio/recurso
|
|
175
|
+
- ✅ Exportar como objeto com métodos
|
|
176
|
+
|
|
177
|
+
### 4.2 Adapters — Parsers de Contrato
|
|
178
|
+
|
|
179
|
+
Adapters transformam dados da API para o contrato TypeScript da aplicação (e vice-versa). São **funções puras** sem side effects.
|
|
180
|
+
|
|
181
|
+
```typescript
|
|
182
|
+
// adapters/marketplace-adapter.ts
|
|
183
|
+
import type {
|
|
184
|
+
MarketplaceListResponse,
|
|
185
|
+
MarketplaceItemResponse,
|
|
186
|
+
} from '../types/marketplace.types'
|
|
187
|
+
import type {
|
|
188
|
+
MarketplaceItem,
|
|
189
|
+
MarketplaceList,
|
|
190
|
+
} from '../types/marketplace.contracts'
|
|
191
|
+
|
|
192
|
+
export const marketplaceAdapter = {
|
|
193
|
+
/**
|
|
194
|
+
* API response → App contract (inbound)
|
|
195
|
+
*/
|
|
196
|
+
toMarketplaceItem(response: MarketplaceItemResponse): MarketplaceItem {
|
|
197
|
+
return {
|
|
198
|
+
id: response.uuid,
|
|
199
|
+
name: response.name,
|
|
200
|
+
vendor: response.vendor_name,
|
|
201
|
+
category: response.category_slug,
|
|
202
|
+
price: response.price_cents / 100,
|
|
203
|
+
isActive: response.status === 'active',
|
|
204
|
+
createdAt: new Date(response.created_at),
|
|
205
|
+
updatedAt: new Date(response.updated_at),
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
|
|
209
|
+
toMarketplaceList(response: MarketplaceListResponse): MarketplaceList {
|
|
210
|
+
return {
|
|
211
|
+
items: response.results.map(marketplaceAdapter.toMarketplaceItem),
|
|
212
|
+
totalItems: response.count,
|
|
213
|
+
totalPages: Math.ceil(response.count / response.page_size),
|
|
214
|
+
currentPage: response.page,
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* App contract → API payload (outbound)
|
|
220
|
+
*/
|
|
221
|
+
toCreatePayload(item: CreateMarketplaceInput): CreateMarketplacePayload {
|
|
222
|
+
return {
|
|
223
|
+
name: item.name,
|
|
224
|
+
vendor_name: item.vendor,
|
|
225
|
+
category_slug: item.category,
|
|
226
|
+
price_cents: Math.round(item.price * 100),
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
}
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
**Regras de Adapter:**
|
|
233
|
+
- ✅ Funções puras (input → output, sem side effects)
|
|
234
|
+
- ✅ Dois sentidos: API→App (inbound) e App→API (outbound)
|
|
235
|
+
- ✅ Renomear campos (snake_case API → camelCase App)
|
|
236
|
+
- ✅ Converter tipos (string→Date, cents→decimal, status→boolean)
|
|
237
|
+
- ❌ Sem chamadas HTTP
|
|
238
|
+
- ❌ Sem acesso a store/composable
|
|
239
|
+
- ❌ Sem try/catch (falha = tipo errado = bug a ser corrigido)
|
|
240
|
+
|
|
241
|
+
### 4.3 Types & Contracts
|
|
242
|
+
|
|
243
|
+
```typescript
|
|
244
|
+
// types/marketplace.types.ts
|
|
245
|
+
// ← Tipos que refletem a API exatamente como ela retorna (snake_case)
|
|
246
|
+
|
|
247
|
+
export interface MarketplaceItemResponse {
|
|
248
|
+
uuid: string
|
|
249
|
+
name: string
|
|
250
|
+
vendor_name: string
|
|
251
|
+
category_slug: string
|
|
252
|
+
price_cents: number
|
|
253
|
+
status: 'active' | 'inactive' | 'pending'
|
|
254
|
+
created_at: string
|
|
255
|
+
updated_at: string
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export interface MarketplaceListResponse {
|
|
259
|
+
count: number
|
|
260
|
+
page: number
|
|
261
|
+
page_size: number
|
|
262
|
+
results: MarketplaceItemResponse[]
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
// types/marketplace.contracts.ts
|
|
266
|
+
// ← Contratos da aplicação (camelCase, tipos corretos)
|
|
267
|
+
|
|
268
|
+
export interface MarketplaceItem {
|
|
269
|
+
id: string
|
|
270
|
+
name: string
|
|
271
|
+
vendor: string
|
|
272
|
+
category: string
|
|
273
|
+
price: number // em reais, não centavos
|
|
274
|
+
isActive: boolean // derivado de status
|
|
275
|
+
createdAt: Date
|
|
276
|
+
updatedAt: Date
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
export interface MarketplaceList {
|
|
280
|
+
items: MarketplaceItem[]
|
|
281
|
+
totalItems: number
|
|
282
|
+
totalPages: number
|
|
283
|
+
currentPage: number
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
export interface CreateMarketplaceInput {
|
|
287
|
+
name: string
|
|
288
|
+
vendor: string
|
|
289
|
+
category: string
|
|
290
|
+
price: number
|
|
291
|
+
}
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
### 4.4 Composables — Lógica de Negócio + Orquestração
|
|
295
|
+
|
|
296
|
+
Composables conectam tudo: chamam service, passam pelo adapter, gerenciam loading/error, e expõem dados reativos.
|
|
297
|
+
|
|
298
|
+
```typescript
|
|
299
|
+
// composables/useMarketplaceList.ts
|
|
300
|
+
import { computed, type MaybeRef } from 'vue'
|
|
301
|
+
import { useQuery, keepPreviousData } from '@tanstack/vue-query'
|
|
302
|
+
import { marketplaceService } from '../services/marketplace-service'
|
|
303
|
+
import { marketplaceAdapter } from '../adapters/marketplace-adapter'
|
|
304
|
+
import type { MarketplaceList } from '../types/marketplace.contracts'
|
|
305
|
+
|
|
306
|
+
interface UseMarketplaceListOptions {
|
|
307
|
+
page: MaybeRef<number>
|
|
308
|
+
pageSize?: MaybeRef<number>
|
|
309
|
+
search?: MaybeRef<string>
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
export function useMarketplaceList(options: UseMarketplaceListOptions) {
|
|
313
|
+
const page = computed(() => toValue(options.page))
|
|
314
|
+
const pageSize = computed(() => toValue(options.pageSize) ?? 20)
|
|
315
|
+
const search = computed(() => toValue(options.search) ?? '')
|
|
316
|
+
|
|
317
|
+
const {
|
|
318
|
+
data,
|
|
319
|
+
isLoading,
|
|
320
|
+
isFetching,
|
|
321
|
+
error,
|
|
322
|
+
refetch,
|
|
323
|
+
} = useQuery({
|
|
324
|
+
queryKey: computed(() => [
|
|
325
|
+
'marketplace',
|
|
326
|
+
'list',
|
|
327
|
+
{ page: page.value, pageSize: pageSize.value, search: search.value },
|
|
328
|
+
]),
|
|
329
|
+
queryFn: async () => {
|
|
330
|
+
const response = await marketplaceService.list({
|
|
331
|
+
page: page.value,
|
|
332
|
+
pageSize: pageSize.value,
|
|
333
|
+
search: search.value,
|
|
334
|
+
})
|
|
335
|
+
return marketplaceAdapter.toMarketplaceList(response.data)
|
|
336
|
+
},
|
|
337
|
+
staleTime: 5 * 60 * 1000,
|
|
338
|
+
placeholderData: keepPreviousData,
|
|
339
|
+
})
|
|
340
|
+
|
|
341
|
+
const items = computed(() => data.value?.items ?? [])
|
|
342
|
+
const totalPages = computed(() => data.value?.totalPages ?? 0)
|
|
343
|
+
const isEmpty = computed(() => !isLoading.value && items.value.length === 0)
|
|
344
|
+
|
|
345
|
+
return {
|
|
346
|
+
// Data
|
|
347
|
+
items,
|
|
348
|
+
totalPages,
|
|
349
|
+
// State
|
|
350
|
+
isLoading,
|
|
351
|
+
isFetching,
|
|
352
|
+
isEmpty,
|
|
353
|
+
error,
|
|
354
|
+
// Actions
|
|
355
|
+
refetch,
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
**Regras de Composable:**
|
|
361
|
+
- ✅ Orquestra: service → adapter → dados reativos
|
|
362
|
+
- ✅ Gerencia loading, error, empty states
|
|
363
|
+
- ✅ Retorna refs/computed (nunca raw values)
|
|
364
|
+
- ✅ Nomear `useXxx`
|
|
365
|
+
- ✅ Retorno tipado e documentado
|
|
366
|
+
- ❌ Sem template/rendering (isso é do componente)
|
|
367
|
+
- ❌ Sem acesso direto à API (service faz isso)
|
|
368
|
+
|
|
369
|
+
### 4.5 Stores Pinia — Apenas Client State
|
|
370
|
+
|
|
371
|
+
Pinia é para estado que **não vem do servidor**: UI state, filtros, preferências, auth.
|
|
372
|
+
|
|
373
|
+
```typescript
|
|
374
|
+
// stores/marketplace-store.ts
|
|
375
|
+
import { defineStore } from 'pinia'
|
|
376
|
+
import { ref, computed } from 'vue'
|
|
377
|
+
|
|
378
|
+
export const useMarketplaceStore = defineStore('marketplace', () => {
|
|
379
|
+
// State
|
|
380
|
+
const selectedCategory = ref<string | null>(null)
|
|
381
|
+
const viewMode = ref<'grid' | 'list'>('grid')
|
|
382
|
+
const searchQuery = ref('')
|
|
383
|
+
|
|
384
|
+
// Getters
|
|
385
|
+
const hasActiveFilters = computed(() =>
|
|
386
|
+
!!selectedCategory.value || !!searchQuery.value
|
|
387
|
+
)
|
|
388
|
+
|
|
389
|
+
// Actions
|
|
390
|
+
function setCategory(category: string | null) {
|
|
391
|
+
selectedCategory.value = category
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
function setViewMode(mode: 'grid' | 'list') {
|
|
395
|
+
viewMode.value = mode
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
function clearFilters() {
|
|
399
|
+
selectedCategory.value = null
|
|
400
|
+
searchQuery.value = ''
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
return {
|
|
404
|
+
// State (readonly para consumers)
|
|
405
|
+
selectedCategory: readonly(selectedCategory),
|
|
406
|
+
viewMode: readonly(viewMode),
|
|
407
|
+
searchQuery, // writeable se usado com v-model
|
|
408
|
+
// Getters
|
|
409
|
+
hasActiveFilters,
|
|
410
|
+
// Actions
|
|
411
|
+
setCategory,
|
|
412
|
+
setViewMode,
|
|
413
|
+
clearFilters,
|
|
414
|
+
}
|
|
415
|
+
})
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
**Regras de Store:**
|
|
419
|
+
- ✅ Apenas client state (UI, filtros, preferências, session)
|
|
420
|
+
- ✅ Setup syntax (`defineStore('id', () => { ... })`)
|
|
421
|
+
- ✅ State exposto como `readonly()` quando não precisa de v-model
|
|
422
|
+
- ✅ `storeToRefs()` obrigatório ao desestruturar em componentes
|
|
423
|
+
- ❌ Sem server state (dados da API vão em TanStack Vue Query)
|
|
424
|
+
- ❌ Sem chamadas HTTP dentro de stores
|
|
425
|
+
- ❌ Sem lógica de negócio complexa (composable faz isso)
|
|
426
|
+
|
|
427
|
+
---
|
|
428
|
+
|
|
429
|
+
## 5. Componentes Vue – Composition Pattern
|
|
430
|
+
|
|
431
|
+
### 5.1 Padrão de SFC
|
|
432
|
+
|
|
433
|
+
```vue
|
|
434
|
+
<script setup lang="ts">
|
|
435
|
+
// 1. Imports
|
|
436
|
+
import { ref, computed } from 'vue'
|
|
437
|
+
import { storeToRefs } from 'pinia'
|
|
438
|
+
import { useMarketplaceList } from '../composables/useMarketplaceList'
|
|
439
|
+
import { useMarketplaceStore } from '../stores/marketplace-store'
|
|
440
|
+
import MarketplaceCard from './MarketplaceCard.vue'
|
|
441
|
+
import type { MarketplaceItem } from '../types/marketplace.contracts'
|
|
442
|
+
|
|
443
|
+
// 2. Props & Emits (type-based)
|
|
444
|
+
interface Props {
|
|
445
|
+
categoryFilter?: string
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
interface Emits {
|
|
449
|
+
(e: 'select', item: MarketplaceItem): void
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
453
|
+
categoryFilter: undefined,
|
|
454
|
+
})
|
|
455
|
+
|
|
456
|
+
const emit = defineEmits<Emits>()
|
|
457
|
+
|
|
458
|
+
// 3. Stores (com storeToRefs)
|
|
459
|
+
const store = useMarketplaceStore()
|
|
460
|
+
const { searchQuery, viewMode } = storeToRefs(store)
|
|
461
|
+
|
|
462
|
+
// 4. Composables
|
|
463
|
+
const page = ref(1)
|
|
464
|
+
const { items, totalPages, isLoading, isEmpty } = useMarketplaceList({
|
|
465
|
+
page,
|
|
466
|
+
search: searchQuery,
|
|
467
|
+
})
|
|
468
|
+
|
|
469
|
+
// 5. Local state
|
|
470
|
+
const selectedId = ref<string | null>(null)
|
|
471
|
+
|
|
472
|
+
// 6. Computed
|
|
473
|
+
const isFirstPage = computed(() => page.value === 1)
|
|
474
|
+
|
|
475
|
+
// 7. Handlers
|
|
476
|
+
function handleSelect(item: MarketplaceItem) {
|
|
477
|
+
selectedId.value = item.id
|
|
478
|
+
emit('select', item)
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
function handlePageChange(newPage: number) {
|
|
482
|
+
page.value = newPage
|
|
483
|
+
}
|
|
484
|
+
</script>
|
|
485
|
+
|
|
486
|
+
<template>
|
|
487
|
+
<!-- ... -->
|
|
488
|
+
</template>
|
|
489
|
+
|
|
490
|
+
<style scoped>
|
|
491
|
+
/* ... */
|
|
492
|
+
</style>
|
|
493
|
+
```
|
|
494
|
+
|
|
495
|
+
### 5.2 Stop Prop Drilling – Component Composition
|
|
496
|
+
|
|
497
|
+
**❌ ERRADO – Prop Drilling:**
|
|
498
|
+
```vue
|
|
499
|
+
<!-- GrandParent passa props por 3 níveis -->
|
|
500
|
+
<Parent :user="user" :theme="theme" :permissions="permissions">
|
|
501
|
+
<Child :user="user" :theme="theme" :permissions="permissions">
|
|
502
|
+
<GrandChild :user="user" :permissions="permissions" />
|
|
503
|
+
</Child>
|
|
504
|
+
</Parent>
|
|
505
|
+
```
|
|
506
|
+
|
|
507
|
+
**✅ CORRETO – Composition com Slots:**
|
|
508
|
+
```vue
|
|
509
|
+
<!-- MarketplaceView.vue (View/Page) -->
|
|
510
|
+
<template>
|
|
511
|
+
<PageLayout>
|
|
512
|
+
<template #header>
|
|
513
|
+
<MarketplaceFilters />
|
|
514
|
+
</template>
|
|
515
|
+
|
|
516
|
+
<template #content>
|
|
517
|
+
<MarketplaceList @select="handleSelect">
|
|
518
|
+
<template #card="{ item }">
|
|
519
|
+
<MarketplaceCard :item="item" />
|
|
520
|
+
</template>
|
|
521
|
+
|
|
522
|
+
<template #empty>
|
|
523
|
+
<EmptyState message="Nenhum item encontrado" />
|
|
524
|
+
</template>
|
|
525
|
+
</MarketplaceList>
|
|
526
|
+
</template>
|
|
527
|
+
|
|
528
|
+
<template #sidebar>
|
|
529
|
+
<MarketplaceDetails v-if="selectedItem" :item="selectedItem" />
|
|
530
|
+
</template>
|
|
531
|
+
</PageLayout>
|
|
532
|
+
</template>
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
**✅ CORRETO – Provide/Inject para contexto compartilhado:**
|
|
536
|
+
```typescript
|
|
537
|
+
// composables/useMarketplaceContext.ts
|
|
538
|
+
import type { InjectionKey, Ref } from 'vue'
|
|
539
|
+
|
|
540
|
+
interface MarketplaceContext {
|
|
541
|
+
selectedItem: Ref<MarketplaceItem | null>
|
|
542
|
+
selectItem: (item: MarketplaceItem) => void
|
|
543
|
+
clearSelection: () => void
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
export const MARKETPLACE_CONTEXT: InjectionKey<MarketplaceContext> = Symbol('marketplace-context')
|
|
547
|
+
|
|
548
|
+
export function provideMarketplaceContext() {
|
|
549
|
+
const selectedItem = ref<MarketplaceItem | null>(null)
|
|
550
|
+
|
|
551
|
+
function selectItem(item: MarketplaceItem) {
|
|
552
|
+
selectedItem.value = item
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
function clearSelection() {
|
|
556
|
+
selectedItem.value = null
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
const context: MarketplaceContext = {
|
|
560
|
+
selectedItem: readonly(selectedItem),
|
|
561
|
+
selectItem,
|
|
562
|
+
clearSelection,
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
provide(MARKETPLACE_CONTEXT, context)
|
|
566
|
+
return context
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
export function useMarketplaceContext() {
|
|
570
|
+
const context = inject(MARKETPLACE_CONTEXT)
|
|
571
|
+
if (!context) {
|
|
572
|
+
throw new Error('useMarketplaceContext must be used within a MarketplaceView')
|
|
573
|
+
}
|
|
574
|
+
return context
|
|
575
|
+
}
|
|
576
|
+
```
|
|
577
|
+
|
|
578
|
+
### 5.3 Hierarquia de Componentes
|
|
579
|
+
|
|
580
|
+
```
|
|
581
|
+
Views (Pages) → Composição, orquestração, provide context
|
|
582
|
+
└── Layout → Estrutura visual (slots)
|
|
583
|
+
└── Features → Lógica de feature (composables, stores)
|
|
584
|
+
└── Shared → Apresentação pura (props in, events out)
|
|
585
|
+
```
|
|
586
|
+
|
|
587
|
+
| Tipo | Responsabilidade | Pode ter lógica? | Pode ter estado? |
|
|
588
|
+
|------|-----------------|-----------------|-----------------|
|
|
589
|
+
| **Views** | Compor componentes, provide context | Via composables | Sim (composables) |
|
|
590
|
+
| **Feature Components** | UI + lógica da feature | Via composables | Sim (composables) |
|
|
591
|
+
| **Shared Components** | UI genérica, reutilizável | Mínima (UI only) | Mínimo (local) |
|
|
592
|
+
|
|
593
|
+
---
|
|
594
|
+
|
|
595
|
+
## 6. Utils vs Helpers
|
|
596
|
+
|
|
597
|
+
### Utils — Funções Puras
|
|
598
|
+
- Sem side effects
|
|
599
|
+
- Input → Output determinístico
|
|
600
|
+
- Testáveis sem mocks
|
|
601
|
+
- Sem dependência de DOM, browser APIs, ou Vue
|
|
602
|
+
|
|
603
|
+
```typescript
|
|
604
|
+
// shared/utils/format-date.ts
|
|
605
|
+
export function formatDate(date: Date, locale = 'pt-BR'): string {
|
|
606
|
+
return new Intl.DateTimeFormat(locale).format(date)
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
// shared/utils/currency.ts
|
|
610
|
+
export function formatCurrency(value: number, currency = 'BRL'): string {
|
|
611
|
+
return new Intl.NumberFormat('pt-BR', { style: 'currency', currency }).format(value)
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
// shared/utils/string.ts
|
|
615
|
+
export function slugify(text: string): string {
|
|
616
|
+
return text.toLowerCase().replace(/\s+/g, '-').replace(/[^\w-]/g, '')
|
|
617
|
+
}
|
|
618
|
+
```
|
|
619
|
+
|
|
620
|
+
### Helpers — Funções com Side Effects ou DOM
|
|
621
|
+
- Interagem com browser APIs (clipboard, localStorage, DOM)
|
|
622
|
+
- Podem ter side effects
|
|
623
|
+
- Podem precisar de mocks nos testes
|
|
624
|
+
|
|
625
|
+
```typescript
|
|
626
|
+
// shared/helpers/clipboard-helper.ts
|
|
627
|
+
export async function copyToClipboard(text: string): Promise<boolean> {
|
|
628
|
+
try {
|
|
629
|
+
await navigator.clipboard.writeText(text)
|
|
630
|
+
return true
|
|
631
|
+
} catch {
|
|
632
|
+
return false
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
// shared/helpers/download-helper.ts
|
|
637
|
+
export function downloadAsFile(content: string, filename: string): void {
|
|
638
|
+
const blob = new Blob([content], { type: 'text/plain' })
|
|
639
|
+
const url = URL.createObjectURL(blob)
|
|
640
|
+
const a = document.createElement('a')
|
|
641
|
+
a.href = url
|
|
642
|
+
a.download = filename
|
|
643
|
+
a.click()
|
|
644
|
+
URL.revokeObjectURL(url)
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
// shared/helpers/toast-helper.ts
|
|
648
|
+
export function showToast(message: string, type: 'success' | 'error' = 'success') {
|
|
649
|
+
// integra com lib de toast (PrimeVue Toast, etc.)
|
|
650
|
+
}
|
|
651
|
+
```
|
|
652
|
+
|
|
653
|
+
---
|
|
654
|
+
|
|
655
|
+
## 7. Error Handling — Padrão Centralizado
|
|
656
|
+
|
|
657
|
+
### Na Camada de Query (composable)
|
|
658
|
+
```typescript
|
|
659
|
+
// O try/catch fica no queryFn ou no onError da mutation
|
|
660
|
+
const { mutate: deleteItem } = useMutation({
|
|
661
|
+
mutationFn: (id: string) => marketplaceService.delete(id),
|
|
662
|
+
onSuccess: () => {
|
|
663
|
+
queryClient.invalidateQueries({ queryKey: ['marketplace'] })
|
|
664
|
+
showToast('Item removido com sucesso')
|
|
665
|
+
},
|
|
666
|
+
onError: (error) => {
|
|
667
|
+
showToast(parseApiError(error), 'error')
|
|
668
|
+
},
|
|
669
|
+
})
|
|
670
|
+
```
|
|
671
|
+
|
|
672
|
+
### Parser de Erros Centralizado
|
|
673
|
+
```typescript
|
|
674
|
+
// shared/utils/parse-api-error.ts
|
|
675
|
+
import type { AxiosError } from 'axios'
|
|
676
|
+
|
|
677
|
+
interface ApiErrorResponse {
|
|
678
|
+
message?: string
|
|
679
|
+
detail?: string
|
|
680
|
+
errors?: Record<string, string[]>
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
export function parseApiError(error: unknown): string {
|
|
684
|
+
if (error instanceof AxiosError) {
|
|
685
|
+
const data = error.response?.data as ApiErrorResponse | undefined
|
|
686
|
+
if (data?.message) return data.message
|
|
687
|
+
if (data?.detail) return data.detail
|
|
688
|
+
if (error.response?.status === 403) return 'Sem permissão para esta ação'
|
|
689
|
+
if (error.response?.status === 404) return 'Recurso não encontrado'
|
|
690
|
+
if (error.response?.status === 500) return 'Erro interno do servidor'
|
|
691
|
+
}
|
|
692
|
+
return 'Erro inesperado. Tente novamente.'
|
|
693
|
+
}
|
|
694
|
+
```
|
|
695
|
+
|
|
696
|
+
### Interceptor Global (API Client)
|
|
697
|
+
```typescript
|
|
698
|
+
// shared/services/api-client.ts
|
|
699
|
+
import axios from 'axios'
|
|
700
|
+
|
|
701
|
+
export const api = axios.create({
|
|
702
|
+
baseURL: import.meta.env.VITE_API_BASE_URL,
|
|
703
|
+
})
|
|
704
|
+
|
|
705
|
+
api.interceptors.response.use(
|
|
706
|
+
(response) => response,
|
|
707
|
+
(error) => {
|
|
708
|
+
// Apenas log e redirect em 401 (session expired)
|
|
709
|
+
if (error.response?.status === 401) {
|
|
710
|
+
// redirect to login
|
|
711
|
+
}
|
|
712
|
+
// NÃO tratar outros erros aqui – deixar para quem chamou
|
|
713
|
+
return Promise.reject(error)
|
|
714
|
+
},
|
|
715
|
+
)
|
|
716
|
+
```
|
|
717
|
+
|
|
718
|
+
---
|
|
719
|
+
|
|
720
|
+
## 8. Barrel Exports (index.ts)
|
|
721
|
+
|
|
722
|
+
Cada módulo exporta apenas sua **API pública**:
|
|
723
|
+
|
|
724
|
+
```typescript
|
|
725
|
+
// modules/marketplace/index.ts
|
|
726
|
+
|
|
727
|
+
// Views (para o router)
|
|
728
|
+
export { default as MarketplaceView } from './views/MarketplaceView.vue'
|
|
729
|
+
|
|
730
|
+
// Componentes reutilizáveis por outros (raro, evitar)
|
|
731
|
+
export { default as MarketplaceCard } from './components/MarketplaceCard.vue'
|
|
732
|
+
|
|
733
|
+
// Types (para quem precisa tipar)
|
|
734
|
+
export type { MarketplaceItem, MarketplaceList } from './types/marketplace.contracts'
|
|
735
|
+
|
|
736
|
+
// ❌ NÃO exportar:
|
|
737
|
+
// - services (detalhe interno)
|
|
738
|
+
// - adapters (detalhe interno)
|
|
739
|
+
// - stores (usar via composable)
|
|
740
|
+
// - composables internos
|
|
741
|
+
```
|
|
742
|
+
|
|
743
|
+
---
|
|
744
|
+
|
|
745
|
+
## 9. Regras SOLID aplicadas ao Vue
|
|
746
|
+
|
|
747
|
+
| Princípio | Aplicação Vue |
|
|
748
|
+
|-----------|--------------|
|
|
749
|
+
| **S**ingle Responsibility | 1 componente = 1 responsabilidade. 1 composable = 1 domínio. 1 service = 1 recurso. |
|
|
750
|
+
| **O**pen/Closed | Componentes extensíveis via slots e props, não por modificação interna. |
|
|
751
|
+
| **L**iskov Substitution | Componentes shared devem funcionar em qualquer contexto sem quebrar. |
|
|
752
|
+
| **I**nterface Segregation | Props específicas, não objetos genéricos. `<UserAvatar :src :alt>` não `<UserAvatar :user>`. |
|
|
753
|
+
| **D**ependency Inversion | Composables dependem de interfaces (types), não de implementações. Services injetados via composable, não importados direto no componente. |
|
|
754
|
+
|
|
755
|
+
---
|
|
756
|
+
|
|
757
|
+
## 10. Checklist de Migração por Arquivo
|
|
758
|
+
|
|
759
|
+
### Componente .vue
|
|
760
|
+
- [ ] `<script setup lang="ts">`
|
|
761
|
+
- [ ] Props type-based (`defineProps<T>()`)
|
|
762
|
+
- [ ] Emits type-based (`defineEmits<T>()`)
|
|
763
|
+
- [ ] Sem prop drilling (usar composition/provide-inject)
|
|
764
|
+
- [ ] < 200 linhas total
|
|
765
|
+
- [ ] Template < 100 linhas
|
|
766
|
+
- [ ] Sem lógica de negócio no template
|
|
767
|
+
- [ ] Loading / error / empty states
|
|
768
|
+
- [ ] Sem `v-html` ou com sanitização
|
|
769
|
+
|
|
770
|
+
### Composable
|
|
771
|
+
- [ ] Prefixo `use`
|
|
772
|
+
- [ ] Return type explícito com refs/computed
|
|
773
|
+
- [ ] Usa service + adapter (nunca API direto)
|
|
774
|
+
- [ ] TanStack Vue Query para server state
|
|
775
|
+
- [ ] Error handling via onError da query/mutation
|
|
776
|
+
|
|
777
|
+
### Service
|
|
778
|
+
- [ ] Apenas chamadas HTTP
|
|
779
|
+
- [ ] Sem try/catch
|
|
780
|
+
- [ ] Sem transformação de dados
|
|
781
|
+
- [ ] Tipagem de request e response
|
|
782
|
+
|
|
783
|
+
### Adapter
|
|
784
|
+
- [ ] Funções puras
|
|
785
|
+
- [ ] Inbound (API→App) e Outbound (App→API)
|
|
786
|
+
- [ ] Conversão de naming (snake_case → camelCase)
|
|
787
|
+
- [ ] Conversão de tipos (string→Date, etc.)
|
|
788
|
+
|
|
789
|
+
### Store Pinia
|
|
790
|
+
- [ ] Apenas client state
|
|
791
|
+
- [ ] Setup syntax
|
|
792
|
+
- [ ] `readonly()` no state exposto
|
|
793
|
+
- [ ] `storeToRefs()` nos consumers
|
|
794
|
+
|
|
795
|
+
### Types
|
|
796
|
+
- [ ] `.types.ts` para tipos da API (raw response)
|
|
797
|
+
- [ ] `.contracts.ts` para contratos da aplicação
|
|
798
|
+
- [ ] Sem `any`
|