@pairus/product-data 1.5.0 → 1.7.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/README.md +15 -5
- package/dist/index.d.mts +150 -33
- package/dist/index.d.ts +150 -33
- package/dist/index.js +128 -86
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +128 -86
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -70,7 +70,7 @@ console.log(enriched.palavras_chave); // Otimizadas para e-commerce
|
|
|
70
70
|
```typescript
|
|
71
71
|
const resultado = await client.products.search('refrigerante zero açucar lata');
|
|
72
72
|
for (const item of resultado.produtos) {
|
|
73
|
-
console.log(`[Score: ${item.score}] ${item.gtin} - ${item.xProd}`);
|
|
73
|
+
console.log(`[Score: ${item.score}] ${item.gtin} - ${item.xProd} (${item.marca})`);
|
|
74
74
|
}
|
|
75
75
|
```
|
|
76
76
|
|
|
@@ -100,19 +100,22 @@ const predicao = await client.fiscal.predict({
|
|
|
100
100
|
});
|
|
101
101
|
|
|
102
102
|
const trib = predicao.dados_tributarios!;
|
|
103
|
-
|
|
103
|
+
// CFOP interno (mesma UF) e externo (interestadual): use o que corresponde à operação
|
|
104
|
+
console.log(`CFOP: ${trib.cfop_interno} / ${trib.cfop_externo} | CST/CSOSN: ${trib.icms_cst_csosn}`);
|
|
104
105
|
console.log(`IBS Efetivo: ${trib.ibscbs.ibs_aliquota_efetiva}% | CBS: ${trib.ibscbs.cbs_aliquota_efetiva}%`);
|
|
106
|
+
if (trib.is?.incidencia) console.log(`Imposto Seletivo: CST ${trib.is.CSTIS} (${trib.is.pIS}%)`);
|
|
107
|
+
console.log(trib.avisos_fiscais);
|
|
105
108
|
```
|
|
106
109
|
|
|
107
110
|
#### Saneamento Fiscal em Lote
|
|
108
111
|
```typescript
|
|
109
112
|
const lote = await client.fiscal.sanitize([
|
|
110
|
-
{
|
|
111
|
-
{
|
|
113
|
+
{ NCM: '22021000', xProd: 'Refrigerante Cola', id: 'SKU-001' },
|
|
114
|
+
{ NCM: '22030000', CEST: '0302100', xProd: 'Cerveja Pilsen' },
|
|
112
115
|
]);
|
|
113
116
|
|
|
114
117
|
for (const item of lote.itens) {
|
|
115
|
-
console.log(`NCM: ${item.
|
|
118
|
+
console.log(`NCM: ${item.NCM_informado} | Vigente: ${item.auditoria_fiscal.ncm_vigente} | CEST: ${item.auditoria_fiscal.cest_sugerido}`);
|
|
116
119
|
}
|
|
117
120
|
```
|
|
118
121
|
|
|
@@ -170,6 +173,13 @@ devolve essa mesma nota (`repeticao_idempotente: true`, sem novo faturamento) em
|
|
|
170
173
|
identificador da venda quando o PDV puder reenviá-la depois de reiniciar. A chave vale por 24 h e é liberada se a
|
|
171
174
|
nota for rejeitada, para você corrigir e reenviar.
|
|
172
175
|
|
|
176
|
+
**Contingência off-line da NFC-e**: com a opção ativada na conta (tela de emissão da Área do Cliente), a venda
|
|
177
|
+
não trava quando a SEFAZ não responde: a resposta vem com `sucesso` verdadeiro, `status_sefaz` igual a `CONTINGENCIA`
|
|
178
|
+
(cStat 9, código da PAIRUS) e o DANFE com a tarja de contingência e a via do estabelecimento, sem consumir créditos.
|
|
179
|
+
A nota é transmitida automaticamente depois, e o desfecho chega por webhook (`nfe.autorizada`,
|
|
180
|
+
`nfe.contingencia_rejeitada`, `nfe.substituida_cancelada`, `nfe.substituida_inutilizada`,
|
|
181
|
+
`nfe.regularizacao_manual`). Para recusar a contingência numa venda, envie `permitir_contingencia: false`.
|
|
182
|
+
|
|
173
183
|
#### Forma 3: Simulação Gratuita (Custo ZERO de créditos)
|
|
174
184
|
```typescript
|
|
175
185
|
const simulacao = await client.emissao.simular({
|
package/dist/index.d.mts
CHANGED
|
@@ -46,6 +46,12 @@ interface DocumentoDFe {
|
|
|
46
46
|
tipo_documento?: string;
|
|
47
47
|
manifestacao_status?: string;
|
|
48
48
|
tem_xml_completo?: boolean;
|
|
49
|
+
/** Protocolo de autorização da NF-e (resNFe). */
|
|
50
|
+
protocolo?: string;
|
|
51
|
+
cnpj_destinatario?: string;
|
|
52
|
+
ie_emitente?: string;
|
|
53
|
+
ambiente?: string;
|
|
54
|
+
[campo: string]: any;
|
|
49
55
|
}
|
|
50
56
|
interface SincronizarDFeInput {
|
|
51
57
|
cnpj: string;
|
|
@@ -72,12 +78,15 @@ interface ListarDocumentosDFeResponse {
|
|
|
72
78
|
total: number;
|
|
73
79
|
ult_nsu: string;
|
|
74
80
|
max_nsu: string;
|
|
81
|
+
/** Data e hora da última sincronização com a SEFAZ. */
|
|
82
|
+
ultima_sincronizacao?: string | null;
|
|
75
83
|
documentos: DocumentoDFe[];
|
|
76
84
|
}
|
|
77
85
|
interface ManifestarDFeInput {
|
|
78
86
|
cnpj: string;
|
|
79
87
|
chave_acesso: string;
|
|
80
88
|
tipo_evento: TipoManifestacaoDFe | string;
|
|
89
|
+
/** Obrigatória apenas no 210240 (15 a 255 caracteres); a API a descarta nos demais eventos. */
|
|
81
90
|
justificativa?: string;
|
|
82
91
|
ambiente?: 'producao' | 'homologacao';
|
|
83
92
|
}
|
|
@@ -87,6 +96,9 @@ interface ManifestarDFeResponse {
|
|
|
87
96
|
xmotivo: string;
|
|
88
97
|
protocolo?: string;
|
|
89
98
|
tipo_evento?: string;
|
|
99
|
+
chave_acesso?: string;
|
|
100
|
+
/** 'ciencia', 'confirmada', 'desconhecida' ou 'nao_realizada'. */
|
|
101
|
+
manifestacao_status?: string;
|
|
90
102
|
detalhes?: Record<string, any>;
|
|
91
103
|
}
|
|
92
104
|
|
|
@@ -198,6 +210,8 @@ interface EmissaoNFeInput {
|
|
|
198
210
|
informacoes_complementares?: string;
|
|
199
211
|
id_token_csc?: string;
|
|
200
212
|
codigo_csc?: string;
|
|
213
|
+
/** NFC-e: false impede a contingência off-line nesta venda; omitido segue a configuração da conta. */
|
|
214
|
+
permitir_contingencia?: boolean;
|
|
201
215
|
[key: string]: any;
|
|
202
216
|
}
|
|
203
217
|
/** Opções de envio da emissão. */
|
|
@@ -210,7 +224,7 @@ interface EmissaoOptions {
|
|
|
210
224
|
}
|
|
211
225
|
interface EmissaoNFeResponse {
|
|
212
226
|
sucesso: boolean;
|
|
213
|
-
/** 'AUTORIZADA', 'REJEITADA', 'PENDENTE_RETORNO', 'DENEGADA' ou 'SIMULADA'. */
|
|
227
|
+
/** 'AUTORIZADA', 'REJEITADA', 'PENDENTE_RETORNO', 'DENEGADA', 'CONTINGENCIA' ou 'SIMULADA'. */
|
|
214
228
|
status_sefaz: string;
|
|
215
229
|
cStat: number;
|
|
216
230
|
xMotivo: string;
|
|
@@ -289,6 +303,12 @@ declare class EmissaoResource extends BaseResource {
|
|
|
289
303
|
inutilizar(params: InutilizacaoInput): Promise<EventoNFeResponse>;
|
|
290
304
|
}
|
|
291
305
|
|
|
306
|
+
/**
|
|
307
|
+
* Tipos da predição fiscal (/v2/fiscal/predict) e do saneamento em lote (/v2/fiscal/sanitize).
|
|
308
|
+
*
|
|
309
|
+
* Espelham o contrato da API. Os nomes usados até a 1.5 (`cfop`, `avisos`, `imposto_seletivo` e
|
|
310
|
+
* `aliquota_efetiva_unificada` na raiz) continuam preenchidos pelo SDK a partir dos oficiais.
|
|
311
|
+
*/
|
|
292
312
|
interface IBSCBSData {
|
|
293
313
|
cst: string;
|
|
294
314
|
cClassTrib: string;
|
|
@@ -296,16 +316,29 @@ interface IBSCBSData {
|
|
|
296
316
|
cbs_diferimento: number;
|
|
297
317
|
cbs_reducao_aliquota: number;
|
|
298
318
|
cbs_aliquota_efetiva: number;
|
|
319
|
+
aliquota_cbs_estimada?: number;
|
|
299
320
|
ibs_aliquota_estadual: number;
|
|
300
321
|
ibs_aliquota_municipal: number;
|
|
301
322
|
ibs_diferimento: number;
|
|
302
323
|
ibs_reducao_aliquota: number;
|
|
324
|
+
ibs_reducao_aliquota_estadual?: number;
|
|
325
|
+
ibs_reducao_aliquota_municipal?: number;
|
|
303
326
|
ibs_aliquota_efetiva: number;
|
|
327
|
+
aliquota_ibs_estimada?: number;
|
|
328
|
+
aliquota_efetiva_unificada?: number;
|
|
329
|
+
vTotDFe_obrigatorio?: boolean;
|
|
304
330
|
}
|
|
331
|
+
/** Imposto Seletivo: chega na chave `is` de `dados_tributarios`. */
|
|
305
332
|
interface SelectiveTaxData {
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
333
|
+
incidencia?: boolean;
|
|
334
|
+
CSTIS?: string | null;
|
|
335
|
+
cClassTribIS?: string | null;
|
|
336
|
+
pIS?: number;
|
|
337
|
+
nota?: string | null;
|
|
338
|
+
/** @deprecated Use `CSTIS`. */
|
|
339
|
+
cst?: string | null;
|
|
340
|
+
/** @deprecated Use `pIS`. */
|
|
341
|
+
aliquota?: number;
|
|
309
342
|
}
|
|
310
343
|
interface FuelData {
|
|
311
344
|
codigo_anp: string;
|
|
@@ -317,30 +350,55 @@ interface FuelData {
|
|
|
317
350
|
}
|
|
318
351
|
interface TaxPredictionData {
|
|
319
352
|
ncm_sugerido: string;
|
|
320
|
-
cest_sugerido?: string;
|
|
321
|
-
|
|
322
|
-
|
|
353
|
+
cest_sugerido?: string | null;
|
|
354
|
+
origem_mercadoria?: string;
|
|
355
|
+
origem_mercadoria_descricao?: string;
|
|
356
|
+
cfop_interno?: string;
|
|
357
|
+
cfop_externo?: string;
|
|
358
|
+
cfop_devolucao_interno?: string | null;
|
|
359
|
+
cfop_devolucao_externo?: string | null;
|
|
323
360
|
icms_cst_csosn: string;
|
|
324
361
|
icms_aliquota: number;
|
|
325
|
-
icms_aliquota_st: number;
|
|
326
|
-
icms_mva_st: number;
|
|
327
362
|
icms_reducao_bc: number;
|
|
363
|
+
icms_sujeito_st?: boolean;
|
|
364
|
+
icms_mva_st: number;
|
|
365
|
+
icms_aliquota_st: number;
|
|
328
366
|
icms_reducao_bc_st: number;
|
|
329
|
-
icms_modalidade_bc
|
|
330
|
-
icms_modalidade_bc_st
|
|
367
|
+
icms_modalidade_bc?: string | null;
|
|
368
|
+
icms_modalidade_bc_st?: string | null;
|
|
369
|
+
icms_credito_aliquota_sn?: number;
|
|
370
|
+
dados_desoneracao_suframa?: Record<string, any> | null;
|
|
331
371
|
pis_cst: string;
|
|
332
372
|
pis_aliquota: number;
|
|
333
373
|
cofins_cst: string;
|
|
334
374
|
cofins_aliquota: number;
|
|
335
|
-
ipi_cst?: string;
|
|
375
|
+
ipi_cst?: string | null;
|
|
336
376
|
ipi_aliquota?: number;
|
|
377
|
+
extipi?: string | null;
|
|
378
|
+
reforma_tributaria_nota?: string;
|
|
337
379
|
ibscbs: IBSCBSData;
|
|
380
|
+
/** Imposto Seletivo (nome oficial da chave na API). */
|
|
381
|
+
is?: SelectiveTaxData;
|
|
382
|
+
combustivel_sujeito_anp?: boolean;
|
|
383
|
+
dados_combustivel?: FuelData | null;
|
|
384
|
+
diagnostico_anti_rejeicao?: Array<Record<string, string>>;
|
|
385
|
+
otimizacao_tributaria?: Record<string, any> | null;
|
|
386
|
+
difal?: Record<string, any> | null;
|
|
387
|
+
motor_ia: string;
|
|
388
|
+
avisos_fiscais?: string[];
|
|
389
|
+
disclaimer?: string;
|
|
390
|
+
/** @deprecated Use `cfop_interno` ou `cfop_externo` conforme a UF de destino (preenchido com `cfop_interno`). */
|
|
391
|
+
cfop?: string;
|
|
392
|
+
/** @deprecated Use `cfop_devolucao_interno` / `cfop_devolucao_externo`. */
|
|
393
|
+
cfop_devolucao?: string | null;
|
|
394
|
+
/** @deprecated Use `is`. */
|
|
338
395
|
imposto_seletivo?: SelectiveTaxData;
|
|
339
|
-
|
|
396
|
+
/** @deprecated Use `ibscbs.aliquota_efetiva_unificada`. */
|
|
397
|
+
aliquota_efetiva_unificada?: number;
|
|
398
|
+
/** @deprecated Use `avisos_fiscais`. */
|
|
399
|
+
avisos?: string[];
|
|
400
|
+
/** @deprecated Não é devolvido pela API. */
|
|
340
401
|
beneficio_fiscal?: string;
|
|
341
|
-
aliquota_efetiva_unificada: number;
|
|
342
|
-
motor_ia: string;
|
|
343
|
-
avisos: string[];
|
|
344
402
|
}
|
|
345
403
|
interface TaxPredictionItemInput {
|
|
346
404
|
xProd?: string;
|
|
@@ -354,6 +412,10 @@ interface TaxPredictionParams {
|
|
|
354
412
|
ufDestino?: string;
|
|
355
413
|
finalidade?: 'revenda' | 'consumo_final' | 'industrializacao' | string;
|
|
356
414
|
destinatarioContribuinte?: boolean;
|
|
415
|
+
/** Alíquota de crédito de ICMS do Simples Nacional (pCredSN). */
|
|
416
|
+
aliquotaCreditoIcmsSn?: number;
|
|
417
|
+
destinatarioSuframa?: boolean;
|
|
418
|
+
inscricaoSuframa?: string;
|
|
357
419
|
xProd?: string;
|
|
358
420
|
gtin?: string;
|
|
359
421
|
ncm?: string;
|
|
@@ -362,38 +424,49 @@ interface TaxPredictionParams {
|
|
|
362
424
|
}
|
|
363
425
|
interface TaxPredictionItemResult {
|
|
364
426
|
item_index: number;
|
|
365
|
-
xProd?: string;
|
|
427
|
+
xProd?: string | null;
|
|
366
428
|
dados_tributarios: TaxPredictionData;
|
|
367
429
|
}
|
|
368
430
|
interface TaxPredictionResponse {
|
|
369
431
|
status: string;
|
|
370
432
|
provider: string;
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
433
|
+
timestamp?: string;
|
|
434
|
+
motor_ia?: string | null;
|
|
435
|
+
xProd?: string | null;
|
|
436
|
+
dados_tributarios?: TaxPredictionData | null;
|
|
437
|
+
resultados?: TaxPredictionItemResult[] | null;
|
|
374
438
|
}
|
|
439
|
+
/**
|
|
440
|
+
* Item do saneamento. A API exige `NCM`/`CEST` em maiúsculas; os nomes `ncm`, `cest`,
|
|
441
|
+
* `descricao` e `gtin` da 1.5 continuam aceitos e são convertidos pelo SDK.
|
|
442
|
+
*/
|
|
375
443
|
interface FiscalSanitizeItemInput {
|
|
376
|
-
|
|
444
|
+
NCM?: string;
|
|
445
|
+
CEST?: string;
|
|
446
|
+
xProd?: string;
|
|
447
|
+
id?: string;
|
|
448
|
+
/** @deprecated Use `NCM`. */
|
|
449
|
+
ncm?: string;
|
|
450
|
+
/** @deprecated Use `CEST`. */
|
|
377
451
|
cest?: string;
|
|
452
|
+
/** @deprecated Use `xProd`. */
|
|
378
453
|
descricao?: string;
|
|
454
|
+
/** @deprecated Use `id`. */
|
|
379
455
|
gtin?: string;
|
|
380
456
|
}
|
|
381
457
|
interface FiscalSanitizeItemResult {
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
sujeito_st: boolean;
|
|
388
|
-
aliquotas_sugeridas?: Record<string, any>;
|
|
389
|
-
avisos?: string[];
|
|
458
|
+
id?: string;
|
|
459
|
+
xProd?: string;
|
|
460
|
+
NCM_informado?: string;
|
|
461
|
+
CEST_informado?: string | null;
|
|
462
|
+
auditoria_fiscal: Record<string, any>;
|
|
390
463
|
}
|
|
391
464
|
interface FiscalSanitizeResponse {
|
|
392
465
|
status: string;
|
|
393
466
|
provider: string;
|
|
394
467
|
timestamp?: string;
|
|
395
468
|
total_itens: number;
|
|
396
|
-
itens:
|
|
469
|
+
itens: FiscalSanitizeItemResult[];
|
|
397
470
|
}
|
|
398
471
|
|
|
399
472
|
declare class FiscalResource extends BaseResource {
|
|
@@ -403,8 +476,9 @@ declare class FiscalResource extends BaseResource {
|
|
|
403
476
|
predict(params: TaxPredictionParams): Promise<TaxPredictionResponse>;
|
|
404
477
|
/**
|
|
405
478
|
* Audita e higieniza uma lista de produtos em lote perante as tabelas fiscais vigentes.
|
|
479
|
+
* Cada item precisa de `NCM` (aceita também `ncm`); `CEST`, `xProd` e `id` são opcionais.
|
|
406
480
|
*/
|
|
407
|
-
sanitize(itens:
|
|
481
|
+
sanitize(itens: FiscalSanitizeItemInput[]): Promise<FiscalSanitizeResponse>;
|
|
408
482
|
}
|
|
409
483
|
|
|
410
484
|
interface EnderecoNFSeInput {
|
|
@@ -450,6 +524,14 @@ interface RetencoesFederaisInput {
|
|
|
450
524
|
aliquota_inss?: number;
|
|
451
525
|
valor_inss?: number;
|
|
452
526
|
}
|
|
527
|
+
/** Campos da Reforma Tributária (IBS e CBS) sobre serviços (LC 214/2025). */
|
|
528
|
+
interface ReformaTributariaServicoInput {
|
|
529
|
+
cst_ibs_cbs?: string;
|
|
530
|
+
cClassTrib?: string;
|
|
531
|
+
aliquota_ibs_estadual?: number;
|
|
532
|
+
aliquota_ibs_municipal?: number;
|
|
533
|
+
aliquota_cbs?: number;
|
|
534
|
+
}
|
|
453
535
|
interface ServicoNFSeInput {
|
|
454
536
|
item_lista_servico: string;
|
|
455
537
|
discriminacao: string;
|
|
@@ -462,8 +544,10 @@ interface ServicoNFSeInput {
|
|
|
462
544
|
valor_desconto_condicionado?: number;
|
|
463
545
|
iss_retido?: boolean;
|
|
464
546
|
aliquota_iss?: number;
|
|
547
|
+
/** '1' Exigível, '2' Não incidência, '3' Isenção, '4' Exportação, '5' Imunidade, '6'/'7' Suspensa. */
|
|
465
548
|
exigibilidade_iss?: string;
|
|
466
549
|
retencoes_federais?: RetencoesFederaisInput;
|
|
550
|
+
reforma_tributaria?: ReformaTributariaServicoInput;
|
|
467
551
|
}
|
|
468
552
|
interface NFSeEmissaoInput {
|
|
469
553
|
prestador: PrestadorNFSeInput | Record<string, any>;
|
|
@@ -486,6 +570,8 @@ interface NFSeEmissaoResponse {
|
|
|
486
570
|
data_emissao?: string;
|
|
487
571
|
link_visualizacao?: string;
|
|
488
572
|
danfse_pdf_base64?: string;
|
|
573
|
+
/** Alias de danfse_pdf_base64 devolvido pela API. */
|
|
574
|
+
danfse_base64?: string;
|
|
489
575
|
xml_nfse?: string;
|
|
490
576
|
valor_servicos: number;
|
|
491
577
|
valor_iss: number;
|
|
@@ -494,7 +580,13 @@ interface NFSeEmissaoResponse {
|
|
|
494
580
|
valor_liquido: number;
|
|
495
581
|
erros?: string[];
|
|
496
582
|
alertas?: string[];
|
|
497
|
-
trilha_auditoria?:
|
|
583
|
+
trilha_auditoria?: Array<{
|
|
584
|
+
autor: string;
|
|
585
|
+
acao: string;
|
|
586
|
+
justificativa_legal: string;
|
|
587
|
+
campos_alterados?: Record<string, any>;
|
|
588
|
+
timestamp: string;
|
|
589
|
+
}>;
|
|
498
590
|
creditos_cobrados: number;
|
|
499
591
|
tempo_processamento_ms: number;
|
|
500
592
|
}
|
|
@@ -504,6 +596,7 @@ interface CancelamentoNFSeInput {
|
|
|
504
596
|
inscricao_municipal: string;
|
|
505
597
|
codigo_municipio_ibge: string;
|
|
506
598
|
justificativa: string;
|
|
599
|
+
/** '1' Erro de emissão, '2' Serviço não prestado, '3' Duplicidade, '9' Outros. */
|
|
507
600
|
motivo_codigo?: string;
|
|
508
601
|
codigo_verificacao?: string;
|
|
509
602
|
chave_acesso_nacional?: string;
|
|
@@ -535,6 +628,11 @@ declare class NFSeResource extends BaseResource {
|
|
|
535
628
|
consultar(chaveOuNumero: string): Promise<Record<string, any>>;
|
|
536
629
|
}
|
|
537
630
|
|
|
631
|
+
/**
|
|
632
|
+
* Tipos de produto do SDK. A API devolve o produto no layout da NF-e (`GTIN`, `NCM`, `CEST`) com
|
|
633
|
+
* marca, categoria, imagem e pesos em `infoAdicional` e a IA em `enriquecimentoIA`/`tributacaoIA`;
|
|
634
|
+
* o `ProductsResource` converte esse contrato para os tipos abaixo.
|
|
635
|
+
*/
|
|
538
636
|
interface ProductDetails {
|
|
539
637
|
gtin: string;
|
|
540
638
|
xProd: string;
|
|
@@ -549,10 +647,16 @@ interface ProductDetails {
|
|
|
549
647
|
quantidadeEmbalagem?: number;
|
|
550
648
|
dataCadastro?: string;
|
|
551
649
|
dataAtualizacao?: string;
|
|
650
|
+
tpGTIN?: string;
|
|
651
|
+
fonte?: string;
|
|
652
|
+
/** Bloco `infoAdicional` original da API. */
|
|
653
|
+
infoAdicional?: Record<string, any>;
|
|
552
654
|
}
|
|
553
655
|
interface ProductResponse {
|
|
554
656
|
status: string;
|
|
555
657
|
provider: string;
|
|
658
|
+
cStat?: string;
|
|
659
|
+
xMotivo?: string;
|
|
556
660
|
produto?: ProductDetails;
|
|
557
661
|
raw_data?: Record<string, any>;
|
|
558
662
|
}
|
|
@@ -562,6 +666,8 @@ interface ProductSearchResultItem {
|
|
|
562
666
|
marca?: string;
|
|
563
667
|
categoria?: string;
|
|
564
668
|
score?: number;
|
|
669
|
+
/** Explicação da correspondência semântica. */
|
|
670
|
+
justificativa?: string;
|
|
565
671
|
ncm?: string;
|
|
566
672
|
cest?: string;
|
|
567
673
|
imagem_url?: string;
|
|
@@ -571,12 +677,17 @@ interface ProductSearchResponse {
|
|
|
571
677
|
provider: string;
|
|
572
678
|
total_encontrados: number;
|
|
573
679
|
termo_buscado: string;
|
|
680
|
+
motor_busca?: string;
|
|
574
681
|
produtos: ProductSearchResultItem[];
|
|
575
682
|
}
|
|
576
683
|
interface ProductEnrichedDetails {
|
|
577
684
|
gtin: string;
|
|
578
685
|
xProd: string;
|
|
686
|
+
/** Nome saneado pela IA. */
|
|
687
|
+
xProd_higienizado?: string;
|
|
688
|
+
/** Descrição otimizada para SEO (`enriquecimentoIA.descricao_seo`). */
|
|
579
689
|
descricao_completa?: string;
|
|
690
|
+
/** Atributos técnicos extraídos pela IA (`enriquecimentoIA.atributos`). */
|
|
580
691
|
ficha_tecnica?: Record<string, any>;
|
|
581
692
|
palavras_chave?: string[];
|
|
582
693
|
ncm?: string;
|
|
@@ -586,7 +697,13 @@ interface ProductEnrichedDetails {
|
|
|
586
697
|
imagem_url?: string;
|
|
587
698
|
peso_bruto?: number;
|
|
588
699
|
peso_liquido?: number;
|
|
700
|
+
/** Nó `tributacaoIA` da API. */
|
|
589
701
|
dados_tributarios_sugeridos?: Record<string, any>;
|
|
702
|
+
tpGTIN?: string;
|
|
703
|
+
fonte?: string;
|
|
704
|
+
infoAdicional?: Record<string, any>;
|
|
705
|
+
enriquecimentoIA?: Record<string, any>;
|
|
706
|
+
tributacaoIA?: Record<string, any>;
|
|
590
707
|
}
|
|
591
708
|
|
|
592
709
|
declare class ProductsResource extends BaseResource {
|
|
@@ -672,4 +789,4 @@ declare class NetworkError extends PairusError {
|
|
|
672
789
|
constructor(message: string);
|
|
673
790
|
}
|
|
674
791
|
|
|
675
|
-
export { AuthenticationError, type CancelamentoInput, type CancelamentoNFSeInput, type CancelamentoNFSeResponse, type CartaCorrecaoInput, DEFAULT_BASE_URL, DEFAULT_MAX_RETRIES, DEFAULT_TIMEOUT_MS, DFeResource, type DocumentoDFe, type EmissaoDestinatarioInput, type EmissaoItemInput, type EmissaoNFeInput, type EmissaoNFeResponse, type EmissaoOptions, type EmissaoPagamentoInput, EmissaoResource, type EnderecoNFSeInput, type EventoNFeResponse, FiscalResource, type FiscalSanitizeItemInput, type FiscalSanitizeItemResult, type FiscalSanitizeResponse, type FuelData, type IBSCBSData, type InutilizacaoInput, InvalidSignatureError, type ListarDocumentosDFeParams, type ListarDocumentosDFeResponse, type ManifestarDFeInput, type ManifestarDFeResponse, type NFSeEmissaoInput, type NFSeEmissaoResponse, NFSeResource, NetworkError, PairusAPIError, type PairusClientOptions, PairusError, PairusProductData, type PrestadorNFSeInput, type ProductDetails, type ProductEnrichedDetails, type ProductResponse, type ProductSearchResponse, type ProductSearchResultItem, ProductsResource, RateLimitError, type RetencoesFederaisInput, type SelectiveTaxData, type ServicoNFSeInput, type SincronizarDFeInput, type SincronizarDFeResponse, type TaxPredictionData, type TaxPredictionItemInput, type TaxPredictionItemResult, type TaxPredictionParams, type TaxPredictionResponse, type TipoManifestacaoDFe, type TomadorNFSeInput, type WebhookEvent, Webhooks };
|
|
792
|
+
export { AuthenticationError, type CancelamentoInput, type CancelamentoNFSeInput, type CancelamentoNFSeResponse, type CartaCorrecaoInput, DEFAULT_BASE_URL, DEFAULT_MAX_RETRIES, DEFAULT_TIMEOUT_MS, DFeResource, type DocumentoDFe, type EmissaoDestinatarioInput, type EmissaoItemInput, type EmissaoNFeInput, type EmissaoNFeResponse, type EmissaoOptions, type EmissaoPagamentoInput, EmissaoResource, type EnderecoNFSeInput, type EventoNFeResponse, FiscalResource, type FiscalSanitizeItemInput, type FiscalSanitizeItemResult, type FiscalSanitizeResponse, type FuelData, type IBSCBSData, type InutilizacaoInput, InvalidSignatureError, type ListarDocumentosDFeParams, type ListarDocumentosDFeResponse, type ManifestarDFeInput, type ManifestarDFeResponse, type NFSeEmissaoInput, type NFSeEmissaoResponse, NFSeResource, NetworkError, PairusAPIError, type PairusClientOptions, PairusError, PairusProductData, type PrestadorNFSeInput, type ProductDetails, type ProductEnrichedDetails, type ProductResponse, type ProductSearchResponse, type ProductSearchResultItem, ProductsResource, RateLimitError, type ReformaTributariaServicoInput, type RetencoesFederaisInput, type SelectiveTaxData, type ServicoNFSeInput, type SincronizarDFeInput, type SincronizarDFeResponse, type TaxPredictionData, type TaxPredictionItemInput, type TaxPredictionItemResult, type TaxPredictionParams, type TaxPredictionResponse, type TipoManifestacaoDFe, type TomadorNFSeInput, type WebhookEvent, Webhooks };
|