cecon-interfaces 2.0.9 → 2.0.10
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/dist/esm2022/general/entities/pix-keys.entity.mjs +3 -2
- package/dist/esm2022/general/interfaces/i-pix-key.mjs +1 -1
- package/dist/fesm2022/cecon-interfaces.mjs +1 -0
- package/dist/fesm2022/cecon-interfaces.mjs.map +1 -1
- package/dist/general/entities/pix-keys.entity.d.ts +2 -1
- package/dist/general/entities/pix-keys.entity.js +1 -0
- package/dist/general/interfaces/i-pix-key.d.ts +2 -1
- package/package.json +1 -1
- package/readme.md +247 -10
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { EPixKeyType } from '../enums';
|
|
1
|
+
import { EDocType, EPixKeyType } from '../enums';
|
|
2
2
|
import { IPixKey } from '../interfaces/i-pix-key';
|
|
3
3
|
export declare class PixKeyEntity implements IPixKey {
|
|
4
4
|
description: string;
|
|
5
5
|
doc: string;
|
|
6
|
+
docType: EDocType;
|
|
6
7
|
isDefault: boolean;
|
|
7
8
|
key: string;
|
|
8
9
|
name: string;
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -1,17 +1,254 @@
|
|
|
1
|
-
|
|
1
|
+
# Cecon Interfaces
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://badge.fury.io/js/cecon-interfaces)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
Biblioteca TypeScript contendo interfaces e tipos para os projetos do ecossistema Cecon. Este pacote fornece definições de tipos reutilizáveis para garantir consistência e type safety em todos os serviços e aplicações.
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
## 📦 Instalação
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install cecon-interfaces
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
ou
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
yarn add cecon-interfaces
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## 🚀 Uso Básico
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
import {
|
|
24
|
+
ICompany,
|
|
25
|
+
IUser,
|
|
26
|
+
IOrder,
|
|
27
|
+
INotification
|
|
28
|
+
} from 'cecon-interfaces';
|
|
29
|
+
|
|
30
|
+
// Exemplo de uso das interfaces
|
|
31
|
+
const company: ICompany = {
|
|
32
|
+
id: '123',
|
|
33
|
+
name: 'Minha Empresa',
|
|
34
|
+
// ... outras propriedades
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const user: IUser = {
|
|
38
|
+
id: '456',
|
|
39
|
+
email: 'usuario@exemplo.com',
|
|
40
|
+
// ... outras propriedades
|
|
41
|
+
};
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## 📁 Estrutura do Projeto
|
|
45
|
+
|
|
46
|
+
Este pacote contém interfaces organizadas por domínios:
|
|
47
|
+
|
|
48
|
+
### 🏢 **Negócio e Gestão**
|
|
49
|
+
- `company` - Interfaces para empresas e configurações corporativas
|
|
50
|
+
- `customer` - Definições para clientes e membros
|
|
51
|
+
- `member` - Gestão de membros e acessos
|
|
52
|
+
- `plan` - Planos e assinaturas
|
|
53
|
+
- `subscription-*` - Diferentes tipos de assinaturas
|
|
54
|
+
|
|
55
|
+
### 💰 **Pagamentos e Financeiro**
|
|
56
|
+
- `billing` - Faturamento e cobrança
|
|
57
|
+
- `invoice` - Faturas e documentos fiscais
|
|
58
|
+
- `transaction` - Transações financeiras
|
|
59
|
+
- `mercado-pago` - Integração Mercado Pago
|
|
60
|
+
- `iugu` - Integração Iugu
|
|
61
|
+
- `payio` - Integração PayIO
|
|
62
|
+
- `firebank` - Integração Firebank
|
|
63
|
+
- `binance` - Integração Binance
|
|
64
|
+
|
|
65
|
+
### 📦 **Pedidos e Produtos**
|
|
66
|
+
- `order` - Pedidos e gestão de vendas
|
|
67
|
+
- `product-*` - Produtos globais, por empresa e containers
|
|
68
|
+
- `container` - Containers de produtos
|
|
69
|
+
- `requested-items` - Itens solicitados
|
|
70
|
+
|
|
71
|
+
### 🛍️ **Integrações de Marketplace**
|
|
72
|
+
- `ifood` - Integração iFood
|
|
73
|
+
- `meli` - Integração Mercado Livre
|
|
74
|
+
- `desenfila-*` - Integração Desenfila
|
|
75
|
+
|
|
76
|
+
### 📱 **Comunicação e Notificações**
|
|
77
|
+
- `notification` - Sistema de notificações
|
|
78
|
+
- `wa-server` - Servidor WhatsApp
|
|
79
|
+
- `evolution` - Integração Evolution API
|
|
80
|
+
- `fcm-token-message` - Firebase Cloud Messaging
|
|
81
|
+
|
|
82
|
+
### 🔧 **Infraestrutura e Utilitários**
|
|
83
|
+
- `app` - Configurações de aplicação
|
|
84
|
+
- `device` - Dispositivos e instalações
|
|
85
|
+
- `storage-files` - Arquivos e armazenamento
|
|
86
|
+
- `monitor` - Monitoramento e logs
|
|
87
|
+
- `pubsub` - Sistema de mensageria
|
|
88
|
+
|
|
89
|
+
### 🔐 **Autenticação e Segurança**
|
|
90
|
+
- `token` - Tokens de acesso
|
|
91
|
+
- `jwt-token` - JSON Web Tokens
|
|
92
|
+
- `verifier-token` - Verificação de tokens
|
|
93
|
+
- `member-access` - Controle de acesso
|
|
94
|
+
|
|
95
|
+
### 🌐 **APIs Externas**
|
|
96
|
+
- `viacep` - Integração ViaCEP
|
|
97
|
+
- `bluesoft` - Integração Bluesoft
|
|
98
|
+
- `n8n` - Automação N8N
|
|
99
|
+
- `mobyo` - Integração Mobyo
|
|
100
|
+
|
|
101
|
+
## 💻 Desenvolvimento
|
|
102
|
+
|
|
103
|
+
### Pré-requisitos
|
|
104
|
+
|
|
105
|
+
- Node.js >= 16
|
|
106
|
+
- npm ou yarn
|
|
107
|
+
|
|
108
|
+
### Scripts Disponíveis
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
# Compilar o pacote
|
|
112
|
+
npm run packagr
|
|
113
|
+
|
|
114
|
+
# Build TypeScript
|
|
10
115
|
npm run build
|
|
11
|
-
// terceiro
|
|
12
|
-
npm publish
|
|
13
116
|
|
|
117
|
+
# Deploy completo (packagr + build + publish)
|
|
118
|
+
npm run deploy
|
|
119
|
+
|
|
120
|
+
# Limpar arquivos de distribuição
|
|
121
|
+
npm run clean-dist
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### 🔄 Workflow de Publicação
|
|
125
|
+
|
|
126
|
+
1. **Atualizar versão**: Sempre altere a versão no `package.json` antes de publicar
|
|
127
|
+
```bash
|
|
128
|
+
# Exemplo: de "2.0.1" para "2.0.2"
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
2. **Compilar e publicar**:
|
|
132
|
+
```bash
|
|
133
|
+
npm run deploy
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Ou executar os comandos individualmente:
|
|
137
|
+
```bash
|
|
138
|
+
npm run packagr
|
|
139
|
+
npm run build
|
|
140
|
+
npm publish
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
3. **Commit e push**: Não esqueça de fazer commit das alterações
|
|
144
|
+
```bash
|
|
145
|
+
git add .
|
|
146
|
+
git commit -m "chore: bump version to x.x.x"
|
|
147
|
+
git push origin develop
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## 📖 Exemplos de Uso
|
|
151
|
+
|
|
152
|
+
### Trabalhando com Empresas
|
|
153
|
+
|
|
154
|
+
```typescript
|
|
155
|
+
import { ICompany, ICompanyContact } from 'cecon-interfaces';
|
|
156
|
+
|
|
157
|
+
const empresa: ICompany = {
|
|
158
|
+
id: 'comp_123',
|
|
159
|
+
name: 'Tech Solutions LTDA',
|
|
160
|
+
document: '12.345.678/0001-90',
|
|
161
|
+
// ... outras propriedades
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
const contato: ICompanyContact = {
|
|
165
|
+
id: 'contact_456',
|
|
166
|
+
companyId: 'comp_123',
|
|
167
|
+
email: 'contato@techsolutions.com',
|
|
168
|
+
phone: '+55 11 99999-9999'
|
|
169
|
+
};
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Gerenciando Pedidos
|
|
173
|
+
|
|
174
|
+
```typescript
|
|
175
|
+
import { IOrder, OrderStatus } from 'cecon-interfaces';
|
|
176
|
+
|
|
177
|
+
const pedido: IOrder = {
|
|
178
|
+
id: 'order_789',
|
|
179
|
+
customerId: 'customer_123',
|
|
180
|
+
status: OrderStatus.PENDING,
|
|
181
|
+
items: [
|
|
182
|
+
{
|
|
183
|
+
productId: 'prod_456',
|
|
184
|
+
quantity: 2,
|
|
185
|
+
price: 29.90
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
total: 59.80,
|
|
189
|
+
createdAt: new Date()
|
|
190
|
+
};
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Integrações de Pagamento
|
|
194
|
+
|
|
195
|
+
```typescript
|
|
196
|
+
import { IMercadoPagoPayment, IIuguInvoice } from 'cecon-interfaces';
|
|
197
|
+
|
|
198
|
+
// Mercado Pago
|
|
199
|
+
const pagamentoMP: IMercadoPagoPayment = {
|
|
200
|
+
id: 'mp_payment_123',
|
|
201
|
+
status: 'approved',
|
|
202
|
+
amount: 100.00,
|
|
203
|
+
// ... outras propriedades
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
// Iugu
|
|
207
|
+
const faturaIugu: IIuguInvoice = {
|
|
208
|
+
id: 'iugu_inv_456',
|
|
209
|
+
status: 'paid',
|
|
210
|
+
total_cents: 10000,
|
|
211
|
+
// ... outras propriedades
|
|
212
|
+
};
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
## 🤝 Contribuindo
|
|
216
|
+
|
|
217
|
+
1. Faça um fork do projeto
|
|
218
|
+
2. Crie uma branch para sua feature (`git checkout -b feature/nova-interface`)
|
|
219
|
+
3. Commit suas mudanças (`git commit -am 'Add: nova interface para XYZ'`)
|
|
220
|
+
4. Push para a branch (`git push origin feature/nova-interface`)
|
|
221
|
+
5. Abra um Pull Request
|
|
222
|
+
|
|
223
|
+
### Convenções
|
|
224
|
+
|
|
225
|
+
- Use interfaces com prefixo `I` (ex: `IUser`, `ICompany`)
|
|
226
|
+
- Organize por domínios em pastas separadas
|
|
227
|
+
- Mantenha consistência com os tipos existentes
|
|
228
|
+
- Documente interfaces complexas com JSDoc
|
|
229
|
+
|
|
230
|
+
## 📄 Licença
|
|
231
|
+
|
|
232
|
+
Este projeto está licenciado sob a Licença MIT - veja o arquivo [LICENSE](LICENSE) para detalhes.
|
|
233
|
+
|
|
234
|
+
## 👨💻 Autor
|
|
235
|
+
|
|
236
|
+
**Mark Cecon**
|
|
237
|
+
|
|
238
|
+
- GitHub: [@markcecon](https://github.com/markcecon)
|
|
239
|
+
- Email: [contato através do GitHub](https://github.com/markcecon/cecon-interfaces/issues)
|
|
240
|
+
|
|
241
|
+
## 🐛 Reportar Bugs
|
|
242
|
+
|
|
243
|
+
Encontrou um bug? [Abra uma issue](https://github.com/markcecon/cecon-interfaces/issues) no GitHub.
|
|
244
|
+
|
|
245
|
+
## 📈 Changelog
|
|
246
|
+
|
|
247
|
+
### v2.0.1
|
|
248
|
+
- Versão atual com todas as interfaces principais
|
|
249
|
+
- Suporte completo para TypeScript
|
|
250
|
+
- Integração com principais APIs do ecossistema
|
|
14
251
|
|
|
15
|
-
|
|
252
|
+
---
|
|
16
253
|
|
|
17
|
-
|
|
254
|
+
⭐ **Se este projeto te ajudou, considere dar uma estrela no GitHub!**
|