@plasoft/boletos 1.0.16 → 1.0.18

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/build/index.d.mts CHANGED
@@ -3,17 +3,17 @@ import { PDFOptions } from 'puppeteer-core';
3
3
  interface IGerarBoletoAilos {
4
4
  banco: Banco.AILOS;
5
5
  dados: {
6
- bancario: IDadosBancario$1;
7
- parcela: IParcela$1;
6
+ bancario: IDadosBancario$3;
7
+ parcela: IParcela$3;
8
8
  };
9
9
  }
10
- interface IDadosBancario$1 {
10
+ interface IDadosBancario$3 {
11
11
  numero: string;
12
12
  numero_dv: string;
13
13
  convenio: string;
14
14
  carteira: string;
15
15
  }
16
- interface IParcela$1 {
16
+ interface IParcela$3 {
17
17
  id_boleto: number;
18
18
  parcela: number;
19
19
  vencimento: string | Date;
@@ -24,11 +24,11 @@ interface IParcela$1 {
24
24
  interface IGerarPDFAilos {
25
25
  banco: Banco.AILOS;
26
26
  dados: {
27
- dadosPDF: IDadosPDF$1;
27
+ dadosPDF: IDadosPDF$3;
28
28
  generatePDF?: (content: string, config: PDFOptions) => Promise<string>;
29
29
  };
30
30
  }
31
- interface IDadosPDF$1 {
31
+ interface IDadosPDF$3 {
32
32
  pagador: {
33
33
  nome: string;
34
34
  cnpj: string;
@@ -97,10 +97,10 @@ interface IDadosPDF$1 {
97
97
  interface IGerarRemessaAilos {
98
98
  banco: Banco.AILOS;
99
99
  dados: {
100
- remessa: IDadosRemessa$1;
100
+ remessa: IDadosRemessa$3;
101
101
  };
102
102
  }
103
- interface IDadosRemessa$1 {
103
+ interface IDadosRemessa$3 {
104
104
  beneficiario: {
105
105
  nome: string;
106
106
  cnpj: string;
@@ -167,18 +167,18 @@ interface IDocumentoRetornoAilos {
167
167
  interface IGerarBoletoBradesco {
168
168
  banco: Banco.BRADESCO;
169
169
  dados: {
170
- bancario: IDadosBancario;
171
- parcela: IParcela;
170
+ bancario: IDadosBancario$2;
171
+ parcela: IParcela$2;
172
172
  bradesco?: boolean;
173
173
  };
174
174
  }
175
- interface IDadosBancario {
175
+ interface IDadosBancario$2 {
176
176
  numero: string;
177
177
  numero_dv: string;
178
178
  convenio: string;
179
179
  carteira: string;
180
180
  }
181
- interface IParcela {
181
+ interface IParcela$2 {
182
182
  id_boleto: number;
183
183
  parcela: number;
184
184
  vencimento: string | Date;
@@ -189,11 +189,11 @@ interface IParcela {
189
189
  interface IGerarPDFBradesco {
190
190
  banco: Banco.BRADESCO;
191
191
  dados: {
192
- dadosPDF: IDadosPDF;
192
+ dadosPDF: IDadosPDF$2;
193
193
  generatePDF?: (content: string, config: PDFOptions) => Promise<string>;
194
194
  };
195
195
  }
196
- interface IDadosPDF {
196
+ interface IDadosPDF$2 {
197
197
  pagador: {
198
198
  nome: string;
199
199
  endereco: {
@@ -254,11 +254,11 @@ interface IDadosPDF {
254
254
  interface IGerarRemessaBradesco {
255
255
  banco: Banco.BRADESCO;
256
256
  dados: {
257
- remessa: IDadosRemessa;
257
+ remessa: IDadosRemessa$2;
258
258
  bradesco?: boolean;
259
259
  };
260
260
  }
261
- interface IDadosRemessa {
261
+ interface IDadosRemessa$2 {
262
262
  beneficiario: {
263
263
  nome: string;
264
264
  cnpj: string;
@@ -313,25 +313,307 @@ interface IGerarRetornoBradesco {
313
313
  };
314
314
  }
315
315
 
316
- type IGerarBoleto = IGerarBoletoAilos | IGerarBoletoBradesco;
317
- type IGerarPDF = IGerarPDFAilos | IGerarPDFBradesco;
318
- type IGerarRemessa = IGerarRemessaAilos | IGerarRemessaBradesco;
319
- type IGerarRetorno = IGerarRetornoAilos | IGerarRetornoBradesco;
316
+ interface IGerarBoletoSicredi {
317
+ banco: Banco.SICREDI;
318
+ dados: {
319
+ bancario: IDadosBancario$1;
320
+ parcela: IParcela$1;
321
+ };
322
+ }
323
+ interface IDadosBancario$1 {
324
+ agencia: string;
325
+ posto: string;
326
+ codigoCedente: string;
327
+ tipoCobranca: string;
328
+ tipoCarteira: string;
329
+ }
330
+ interface IParcela$1 {
331
+ id_boleto: number;
332
+ parcela: number;
333
+ vencimento: string | Date;
334
+ valor: number | string;
335
+ pago: number | string;
336
+ data_emissao: string | Date;
337
+ numeroUnico: string;
338
+ }
339
+ interface IGerarPDFSicredi {
340
+ banco: Banco.SICREDI;
341
+ dados: {
342
+ dadosPDF: IDadosPDF$1;
343
+ generatePDF?: (content: string, config: PDFOptions) => Promise<string>;
344
+ };
345
+ }
346
+ interface IDadosPDF$1 {
347
+ pagador: {
348
+ nome: string;
349
+ cnpj: string;
350
+ cpf?: boolean;
351
+ endereco: {
352
+ logradouro: string;
353
+ numero: string;
354
+ bairro: string;
355
+ cep: string;
356
+ municipio: string;
357
+ uf: string;
358
+ };
359
+ };
360
+ beneficiario: {
361
+ nome: string;
362
+ cnpj: string;
363
+ dadosBancario: {
364
+ carteira: string;
365
+ convenio: string;
366
+ agencia: string;
367
+ numero: string;
368
+ posto: string;
369
+ juros?: number;
370
+ multa?: number;
371
+ desconto?: number;
372
+ protesto?: number;
373
+ };
374
+ endereco: {
375
+ logradouro: string;
376
+ numero: string;
377
+ bairro: string;
378
+ cep: string;
379
+ municipio: string;
380
+ uf: string;
381
+ };
382
+ };
383
+ boleto: {
384
+ dataVencimento: string;
385
+ dataProcessamento: string;
386
+ dataDocumento: string;
387
+ valorCobrado: number | string;
388
+ valorDocumento: number | string;
389
+ valorDescontoAbatimento: number | string;
390
+ valorOutrasDeducoes: number | string;
391
+ valorMulta: number | string;
392
+ valorAcrescimo: number | string;
393
+ quantidade?: number | string;
394
+ valor?: number | string;
395
+ numeroDocumento: string;
396
+ nossoNumero: string;
397
+ especieDocumento: string;
398
+ aceite: 'S' | 'N';
399
+ moeda: string;
400
+ usoDoBanco?: string;
401
+ cip?: string;
402
+ codigoBarra: string;
403
+ linhaDigitavel: string;
404
+ codigoBarraImage?: string;
405
+ instrucao1?: string;
406
+ instrucao2?: string;
407
+ instrucao3?: string;
408
+ instrucao4?: string;
409
+ };
410
+ }
411
+ interface IGerarRemessaSicredi {
412
+ banco: Banco.SICREDI;
413
+ dados: {
414
+ remessa: IDadosRemessa$1;
415
+ Sicredi?: boolean;
416
+ };
417
+ }
418
+ interface IDadosRemessa$1 {
419
+ beneficiario: {
420
+ nome: string;
421
+ cnpj: string;
422
+ endereco: {
423
+ logradouro: string;
424
+ numero: string;
425
+ bairro: string;
426
+ cep: string;
427
+ municipio: string;
428
+ uf: string;
429
+ };
430
+ };
431
+ dadosBancario: {
432
+ agencia: string;
433
+ posto: string;
434
+ codigo_cedente: string;
435
+ numeroRemessa: string;
436
+ jurosMes: number;
437
+ multaAtraso: number;
438
+ descontoPagamento: number;
439
+ diasProtesto: number;
440
+ };
441
+ boletos: {
442
+ identificacaoTitulo: string;
443
+ vencimento: string | Date;
444
+ emissao: string | Date;
445
+ valor: number | string;
446
+ nossoNumero: string;
447
+ numeroDocumento: string;
448
+ parcela: number | string;
449
+ pagador: {
450
+ nome: string;
451
+ pessoa: 'F' | 'J';
452
+ cpfCnpj: string;
453
+ endereco: {
454
+ logradouro: string;
455
+ numero: string;
456
+ bairro: string;
457
+ cep: string;
458
+ municipio: string;
459
+ uf: string;
460
+ };
461
+ };
462
+ }[];
463
+ }
464
+ interface IGerarRetornoSicredi {
465
+ banco: Banco.SICREDI;
466
+ dados: {
467
+ arquivo: string[];
468
+ };
469
+ }
470
+
471
+ interface IGerarBoletoSicoob {
472
+ banco: Banco.SICOOB;
473
+ dados: {
474
+ bancario: IDadosBancario;
475
+ parcela: IParcela;
476
+ };
477
+ }
478
+ interface IDadosBancario {
479
+ agencia: string;
480
+ codigo_cliente: string;
481
+ modalidade: string;
482
+ }
483
+ interface IParcela {
484
+ id_boleto: number;
485
+ parcela: number;
486
+ vencimento: string | Date;
487
+ valor: number | string;
488
+ pago: number | string;
489
+ data_emissao: string | Date;
490
+ }
491
+ interface IGerarPDFSicoob {
492
+ banco: Banco.SICOOB;
493
+ dados: {
494
+ dadosPDF: IDadosPDF;
495
+ generatePDF?: (content: string, config: PDFOptions) => Promise<string>;
496
+ };
497
+ }
498
+ interface IDadosPDF {
499
+ beneficiario: {
500
+ nome: string;
501
+ dadosBancario: {
502
+ agencia: string;
503
+ codigo_cliente: string;
504
+ carteira: string;
505
+ };
506
+ };
507
+ pagador: {
508
+ nome: string;
509
+ cnpj: string;
510
+ endereco: {
511
+ logradouro: string;
512
+ numero: string;
513
+ bairro: string;
514
+ cep: string;
515
+ municipio: string;
516
+ uf: string;
517
+ };
518
+ };
519
+ boleto: {
520
+ dataVencimento: string;
521
+ dataProcessamento: string;
522
+ dataDocumento: string;
523
+ valorCobrado: number | string;
524
+ valorDocumento: number | string;
525
+ valorDescontoAbatimento: number | string;
526
+ valorOutrasDeducoes: number | string;
527
+ valorMulta: number | string;
528
+ valorAcrescimo: number | string;
529
+ quantidade?: number | string;
530
+ valor?: number | string;
531
+ parcela: number | string;
532
+ numeroDocumento: string;
533
+ nossoNumero: string;
534
+ especieDocumento: string;
535
+ aceite: 'S' | 'N';
536
+ moeda: string;
537
+ usoDoBanco?: string;
538
+ codigoBarra: string;
539
+ linhaDigitavel: string;
540
+ codigoBarraImage?: string;
541
+ localPagamento?: string;
542
+ instrucao1?: string;
543
+ instrucao2?: string;
544
+ instrucao3?: string;
545
+ observacoes?: string;
546
+ };
547
+ }
548
+ interface IGerarRemessaSicoob {
549
+ banco: Banco.SICOOB;
550
+ dados: {
551
+ remessa: IDadosRemessa;
552
+ };
553
+ }
554
+ interface IDadosRemessa {
555
+ beneficiario: {
556
+ nome: string;
557
+ cnpj: string;
558
+ };
559
+ dadosBancario: {
560
+ carteira: string;
561
+ agencia: string;
562
+ conta: string;
563
+ numeroRemessa: string;
564
+ jurosMes: number;
565
+ multaAtraso: number;
566
+ diasProtesto: number;
567
+ modalidade: string;
568
+ aceite: string;
569
+ };
570
+ boletos: {
571
+ vencimento: string | Date;
572
+ valor: number | string;
573
+ nossoNumero: string;
574
+ numeroDocumento: string;
575
+ parcela: number | string;
576
+ pagador: {
577
+ nome: string;
578
+ pessoa: 'F' | 'J';
579
+ cpfCnpj: string;
580
+ endereco: {
581
+ logradouro: string;
582
+ numero: string;
583
+ bairro: string;
584
+ cep: string;
585
+ municipio: string;
586
+ uf: string;
587
+ };
588
+ };
589
+ }[];
590
+ }
591
+ interface IGerarRetornoSicoob {
592
+ banco: Banco.SICOOB;
593
+ dados: {
594
+ arquivo: string[];
595
+ };
596
+ }
597
+
598
+ type IGerarBoleto = IGerarBoletoAilos | IGerarBoletoBradesco | IGerarBoletoSicredi | IGerarBoletoSicoob;
599
+ type IGerarPDF = IGerarPDFAilos | IGerarPDFBradesco | IGerarPDFSicredi | IGerarPDFSicoob;
600
+ type IGerarRemessa = IGerarRemessaAilos | IGerarRemessaBradesco | IGerarRemessaSicredi | IGerarRemessaSicoob;
601
+ type IGerarRetorno = IGerarRetornoAilos | IGerarRetornoBradesco | IGerarRetornoSicredi | IGerarRetornoSicoob;
320
602
  declare enum Banco {
321
603
  AILOS = "085",
322
- BRADESCO = "005"
604
+ BRADESCO = "005",
605
+ SICREDI = "748",
606
+ SICOOB = "756"
323
607
  }
324
608
 
325
609
  declare function gerar({ banco, dados }: IGerarBoleto): {
326
610
  linhaDigitavel: string;
327
611
  fatorVencimento: string;
328
612
  valor: string;
329
- convenio: string;
330
613
  nossoNumero: string;
331
614
  campoLivre: string;
332
615
  digitoGeral: string;
333
616
  codigoBarra: string;
334
- numeroDocumento: string;
335
617
  } | null | undefined;
336
618
 
337
619
  declare function pdf({ banco, dados }: IGerarPDF): Promise<{