@acontplus/ng-common 1.0.4 → 1.0.6
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 +40 -36
- package/fesm2022/acontplus-ng-common.mjs +439 -136
- package/fesm2022/acontplus-ng-common.mjs.map +1 -1
- package/package.json +1 -1
- package/types/acontplus-ng-common.d.ts +343 -18
|
@@ -106,17 +106,17 @@ interface ReportOptions<T = any> {
|
|
|
106
106
|
data: T;
|
|
107
107
|
format?: 'pdf' | 'excel' | 'word';
|
|
108
108
|
useV1Api?: boolean;
|
|
109
|
-
forceDownload?: boolean;
|
|
110
|
-
returnBlob?: boolean;
|
|
111
109
|
}
|
|
112
110
|
/**
|
|
113
111
|
* Puerto para generación de reportes
|
|
114
112
|
* Solo se encarga de generar reportes, no de impresión
|
|
115
113
|
*/
|
|
116
114
|
interface ReportPort {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
115
|
+
/**
|
|
116
|
+
* Genera un reporte y devuelve el Observable
|
|
117
|
+
* El consumidor decide si descargar, abrir o procesar el blob
|
|
118
|
+
*/
|
|
119
|
+
generate<T>(options: ReportOptions<T>): Observable<HttpResponse<Blob>>;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
/**
|
|
@@ -275,13 +275,198 @@ declare const WHATSAPP_MESSAGING_PORT: InjectionToken<WhatsAppMessagingPort>;
|
|
|
275
275
|
|
|
276
276
|
declare const PRINTER_PORT: InjectionToken<PrinterPort>;
|
|
277
277
|
|
|
278
|
+
/**
|
|
279
|
+
* Facade para generación de reportes
|
|
280
|
+
*
|
|
281
|
+
* Proporciona una API de alto nivel para generar reportes con manejo automático de archivos.
|
|
282
|
+
* Todos los métodos devuelven Observables - el consumidor debe hacer subscribe().
|
|
283
|
+
*
|
|
284
|
+
* @example
|
|
285
|
+
* ```typescript
|
|
286
|
+
* // Control total del blob
|
|
287
|
+
* this.reportFacade.generate(options).subscribe(response => {
|
|
288
|
+
* const blob = response.body;
|
|
289
|
+
* // Procesar blob manualmente
|
|
290
|
+
* });
|
|
291
|
+
*
|
|
292
|
+
* // Descarga automática
|
|
293
|
+
* this.reportFacade.download(options).subscribe();
|
|
294
|
+
*
|
|
295
|
+
* // Abrir PDF automáticamente
|
|
296
|
+
* this.reportFacade.open(options).subscribe();
|
|
297
|
+
* ```
|
|
298
|
+
*/
|
|
278
299
|
declare class ReportFacade {
|
|
279
300
|
private readonly reportPort;
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
301
|
+
/**
|
|
302
|
+
* Genera un reporte y devuelve el Observable con el blob
|
|
303
|
+
*
|
|
304
|
+
* Este método proporciona control total sobre el blob generado.
|
|
305
|
+
* No realiza ninguna acción automática (descarga/apertura).
|
|
306
|
+
* Útil cuando necesitas procesar el blob manualmente (enviar por WhatsApp, guardar en servidor, etc.)
|
|
307
|
+
*
|
|
308
|
+
* @template T - Tipo de datos del reporte
|
|
309
|
+
* @param options - Opciones de generación del reporte
|
|
310
|
+
* @param options.data - Datos del reporte (usar ReportParamsBuilder.build())
|
|
311
|
+
* @param options.format - Formato del reporte: 'pdf' | 'excel' | 'word'
|
|
312
|
+
* @param options.useV1Api - Si debe usar la API v1 (por defecto false)
|
|
313
|
+
* @returns Observable con la respuesta HTTP que contiene el blob
|
|
314
|
+
*
|
|
315
|
+
* @example
|
|
316
|
+
* ```typescript
|
|
317
|
+
* const options = ReportParamsBuilder.build(
|
|
318
|
+
* { codDoc: ELECTRONIC_DOCUMENT_CODE.FV, id: 123 },
|
|
319
|
+
* 'pdf'
|
|
320
|
+
* );
|
|
321
|
+
*
|
|
322
|
+
* this.reportFacade.generate(options).subscribe({
|
|
323
|
+
* next: (response) => {
|
|
324
|
+
* const blob = response.body;
|
|
325
|
+
* const fileName = FileMapperUtil.extractFileName(response);
|
|
326
|
+
* // Procesar blob según necesidad
|
|
327
|
+
* },
|
|
328
|
+
* error: (err) => console.error('Error:', err)
|
|
329
|
+
* });
|
|
330
|
+
* ```
|
|
331
|
+
*/
|
|
332
|
+
generate<T>(options: ReportOptions<T>): Observable<HttpResponse<Blob>>;
|
|
333
|
+
/**
|
|
334
|
+
* Genera un reporte y lo descarga automáticamente
|
|
335
|
+
*
|
|
336
|
+
* Extrae el nombre del archivo desde los headers HTTP y descarga el archivo automáticamente.
|
|
337
|
+
* Funciona para cualquier formato (PDF, Excel, Word).
|
|
338
|
+
* El Observable se completa después de iniciar la descarga.
|
|
339
|
+
*
|
|
340
|
+
* @template T - Tipo de datos del reporte
|
|
341
|
+
* @param options - Opciones de generación del reporte
|
|
342
|
+
* @returns Observable que se completa después de iniciar la descarga
|
|
343
|
+
*
|
|
344
|
+
* @example
|
|
345
|
+
* ```typescript
|
|
346
|
+
* // Con formato dinámico
|
|
347
|
+
* const options = ReportParamsBuilder.build(
|
|
348
|
+
* { codDoc: SALE_CODE_REPORT.FG },
|
|
349
|
+
* this.selectedFormat // 'pdf' | 'excel' | 'word'
|
|
350
|
+
* );
|
|
351
|
+
* this.reportFacade.download(options).subscribe();
|
|
352
|
+
*
|
|
353
|
+
* // Con formato fijo
|
|
354
|
+
* const options = ReportParamsBuilder.build(
|
|
355
|
+
* { codDoc: INVENTORY_CODE_REPORT.RCD },
|
|
356
|
+
* 'excel'
|
|
357
|
+
* );
|
|
358
|
+
* this.reportFacade.download(options).subscribe();
|
|
359
|
+
* ```
|
|
360
|
+
*/
|
|
361
|
+
download<T>(options: ReportOptions<T>): Observable<HttpResponse<Blob>>;
|
|
362
|
+
/**
|
|
363
|
+
* Genera un reporte y lo abre en nueva ventana (o descarga en navegadores legacy)
|
|
364
|
+
*
|
|
365
|
+
* Comportamiento inteligente según el navegador:
|
|
366
|
+
* - Navegadores modernos: Abre el archivo en nueva ventana/pestaña
|
|
367
|
+
* - Navegadores legacy (IE, Edge antiguo): Descarga el archivo
|
|
368
|
+
*
|
|
369
|
+
* Ideal para PDFs que el usuario quiere visualizar inmediatamente.
|
|
370
|
+
* También funciona con Excel/Word pero la experiencia puede variar según el navegador.
|
|
371
|
+
*
|
|
372
|
+
* @template T - Tipo de datos del reporte
|
|
373
|
+
* @param options - Opciones de generación del reporte
|
|
374
|
+
* @returns Observable que se completa después de abrir/descargar el archivo
|
|
375
|
+
*
|
|
376
|
+
* @example
|
|
377
|
+
* ```typescript
|
|
378
|
+
* // Abrir PDF
|
|
379
|
+
* const options = ReportParamsBuilder.build(
|
|
380
|
+
* { codDoc: ELECTRONIC_DOCUMENT_CODE.FV, id: 123 },
|
|
381
|
+
* 'pdf'
|
|
382
|
+
* );
|
|
383
|
+
* this.reportFacade.open(options).subscribe();
|
|
384
|
+
*
|
|
385
|
+
* // Con formato dinámico
|
|
386
|
+
* const format = this.isPDF ? 'pdf' : 'excel';
|
|
387
|
+
* const options = ReportParamsBuilder.build({ codDoc: code }, format);
|
|
388
|
+
* this.reportFacade.open(options).subscribe();
|
|
389
|
+
* ```
|
|
390
|
+
*/
|
|
391
|
+
open<T>(options: ReportOptions<T>): Observable<HttpResponse<Blob>>;
|
|
392
|
+
/**
|
|
393
|
+
* Genera un PDF y lo abre automáticamente (shortcut)
|
|
394
|
+
*
|
|
395
|
+
* Método de conveniencia para el caso común de generar y abrir PDFs.
|
|
396
|
+
* Equivalente a llamar open() con format: 'pdf'.
|
|
397
|
+
*
|
|
398
|
+
* @template T - Tipo de datos del reporte
|
|
399
|
+
* @param data - Datos del reporte (resultado de ReportParamsBuilder.build().data)
|
|
400
|
+
* @param useV1Api - Si debe usar la API v1 (por defecto false)
|
|
401
|
+
* @returns Observable que se completa después de abrir el PDF
|
|
402
|
+
*
|
|
403
|
+
* @example
|
|
404
|
+
* ```typescript
|
|
405
|
+
* const reportOptions = ReportParamsBuilder.build(
|
|
406
|
+
* { codDoc: ELECTRONIC_DOCUMENT_CODE.FV, id: 123 },
|
|
407
|
+
* 'pdf'
|
|
408
|
+
* );
|
|
409
|
+
*
|
|
410
|
+
* // Forma corta
|
|
411
|
+
* this.reportFacade.openPDF(
|
|
412
|
+
* reportOptions.data,
|
|
413
|
+
* reportOptions.useV1Api
|
|
414
|
+
* ).subscribe();
|
|
415
|
+
* ```
|
|
416
|
+
*/
|
|
417
|
+
openPDF<T>(data: T, useV1Api?: boolean): Observable<HttpResponse<Blob>>;
|
|
418
|
+
/**
|
|
419
|
+
* Genera un Excel y lo descarga automáticamente (shortcut)
|
|
420
|
+
*
|
|
421
|
+
* Método de conveniencia para el caso común de generar y descargar archivos Excel.
|
|
422
|
+
* Equivalente a llamar download() con format: 'excel'.
|
|
423
|
+
*
|
|
424
|
+
* @template T - Tipo de datos del reporte
|
|
425
|
+
* @param data - Datos del reporte (resultado de ReportParamsBuilder.build().data)
|
|
426
|
+
* @param useV1Api - Si debe usar la API v1 (por defecto false)
|
|
427
|
+
* @returns Observable que se completa después de iniciar la descarga
|
|
428
|
+
*
|
|
429
|
+
* @example
|
|
430
|
+
* ```typescript
|
|
431
|
+
* const reportOptions = ReportParamsBuilder.build(
|
|
432
|
+
* { codDoc: SALE_CODE_REPORT.FG, fechaInicio: '2024-01-01' },
|
|
433
|
+
* 'excel'
|
|
434
|
+
* );
|
|
435
|
+
*
|
|
436
|
+
* // Forma corta
|
|
437
|
+
* this.reportFacade.downloadExcel(
|
|
438
|
+
* reportOptions.data,
|
|
439
|
+
* reportOptions.useV1Api
|
|
440
|
+
* ).subscribe();
|
|
441
|
+
* ```
|
|
442
|
+
*/
|
|
443
|
+
downloadExcel<T>(data: T, useV1Api?: boolean): Observable<HttpResponse<Blob>>;
|
|
444
|
+
/**
|
|
445
|
+
* Genera un Word y lo descarga automáticamente (shortcut)
|
|
446
|
+
*
|
|
447
|
+
* Método de conveniencia para el caso común de generar y descargar archivos Word.
|
|
448
|
+
* Equivalente a llamar download() con format: 'word'.
|
|
449
|
+
*
|
|
450
|
+
* @template T - Tipo de datos del reporte
|
|
451
|
+
* @param data - Datos del reporte (resultado de ReportParamsBuilder.build().data)
|
|
452
|
+
* @param useV1Api - Si debe usar la API v1 (por defecto false)
|
|
453
|
+
* @returns Observable que se completa después de iniciar la descarga
|
|
454
|
+
*
|
|
455
|
+
* @example
|
|
456
|
+
* ```typescript
|
|
457
|
+
* const reportOptions = ReportParamsBuilder.build(
|
|
458
|
+
* { codDoc: CUSTOMER_CODE_REPORT.RCL },
|
|
459
|
+
* 'word'
|
|
460
|
+
* );
|
|
461
|
+
*
|
|
462
|
+
* // Forma corta
|
|
463
|
+
* this.reportFacade.downloadWord(
|
|
464
|
+
* reportOptions.data,
|
|
465
|
+
* reportOptions.useV1Api
|
|
466
|
+
* ).subscribe();
|
|
467
|
+
* ```
|
|
468
|
+
*/
|
|
469
|
+
downloadWord<T>(data: T, useV1Api?: boolean): Observable<HttpResponse<Blob>>;
|
|
285
470
|
static ɵfac: i0.ɵɵFactoryDeclaration<ReportFacade, never>;
|
|
286
471
|
static ɵprov: i0.ɵɵInjectableDeclaration<ReportFacade>;
|
|
287
472
|
}
|
|
@@ -358,11 +543,13 @@ declare class GreenWhatsAppAdapter implements WhatsAppMessagingPort {
|
|
|
358
543
|
static ɵprov: i0.ɵɵInjectableDeclaration<GreenWhatsAppAdapter>;
|
|
359
544
|
}
|
|
360
545
|
|
|
546
|
+
/**
|
|
547
|
+
* Adapter para generación de reportes
|
|
548
|
+
* Siempre devuelve Observable - el consumidor decide qué hacer con el blob
|
|
549
|
+
*/
|
|
361
550
|
declare class ReportAdapter implements ReportPort {
|
|
362
551
|
private readonly http;
|
|
363
|
-
generate<T>(options: ReportOptions<T>): Observable<HttpResponse<Blob
|
|
364
|
-
getFileName(response: any): string;
|
|
365
|
-
saveFile(response: any, format?: string, forceDownload?: boolean): void;
|
|
552
|
+
generate<T>(options: ReportOptions<T>): Observable<HttpResponse<Blob>>;
|
|
366
553
|
static ɵfac: i0.ɵɵFactoryDeclaration<ReportAdapter, never>;
|
|
367
554
|
static ɵprov: i0.ɵɵInjectableDeclaration<ReportAdapter>;
|
|
368
555
|
}
|
|
@@ -411,43 +598,181 @@ declare class ReportParamsBuilder {
|
|
|
411
598
|
private static readonly reportConfigs;
|
|
412
599
|
/**
|
|
413
600
|
* Construye los parámetros de reporte según el tipo de documento
|
|
601
|
+
*
|
|
602
|
+
* @param docData - Datos del documento con codDoc y parámetros adicionales
|
|
603
|
+
* @param format - Formato del reporte: 'pdf' | 'excel' | 'word'
|
|
604
|
+
* @returns Objeto con hasService, reportParams (string JSON) y dataParams (string JSON)
|
|
605
|
+
*
|
|
606
|
+
* @example
|
|
607
|
+
* ```typescript
|
|
608
|
+
* const params = ReportParamsBuilder.buildParams(
|
|
609
|
+
* { codDoc: ELECTRONIC_DOCUMENT_CODE.FV, id: 123, codEstab: '001' },
|
|
610
|
+
* 'pdf'
|
|
611
|
+
* );
|
|
612
|
+
* // Resultado:
|
|
613
|
+
* // {
|
|
614
|
+
* // hasService: true,
|
|
615
|
+
* // reportParams: "{\"codigo\":\"FV\",\"format\":\"pdf\",\"hasParams\":true,...}",
|
|
616
|
+
* // dataParams: "{\"id\":123,\"codEstab\":\"001\",\"codigo\":\"FV\"}"
|
|
617
|
+
* // }
|
|
618
|
+
* ```
|
|
414
619
|
*/
|
|
415
620
|
static buildParams(docData: ReportDocumentData, format?: 'pdf' | 'excel' | 'word'): ReportParams;
|
|
416
621
|
/**
|
|
417
622
|
* Determina si debe usar la API v1 según el tipo de documento
|
|
623
|
+
*
|
|
624
|
+
* @param codDoc - Código del documento (FV, NE, NC, etc.)
|
|
625
|
+
* @returns true si debe usar API v1, false para API v2
|
|
626
|
+
*
|
|
627
|
+
* @example
|
|
628
|
+
* ```typescript
|
|
629
|
+
* const useV1 = ReportParamsBuilder.shouldUseV1Api(ELECTRONIC_DOCUMENT_CODE.FV);
|
|
630
|
+
* // useV1 = true (documentos electrónicos usan v1)
|
|
631
|
+
*
|
|
632
|
+
* const useV1Sales = ReportParamsBuilder.shouldUseV1Api(SALE_CODE_REPORT.FG);
|
|
633
|
+
* // useV1Sales = false (reportes de ventas usan v2)
|
|
634
|
+
* ```
|
|
418
635
|
*/
|
|
419
636
|
static shouldUseV1Api(codDoc: string): boolean;
|
|
420
637
|
/**
|
|
421
638
|
* Obtiene la configuración para un tipo de documento
|
|
639
|
+
*
|
|
640
|
+
* @param codDoc - Código del documento
|
|
641
|
+
* @returns Configuración del reporte
|
|
642
|
+
* @throws Error si el tipo de documento no está soportado
|
|
643
|
+
* @private
|
|
422
644
|
*/
|
|
423
645
|
private static getReportConfig;
|
|
424
646
|
/**
|
|
425
|
-
* Construye los parámetros del reporte
|
|
647
|
+
* Construye los parámetros del reporte (reportParams)
|
|
648
|
+
*
|
|
649
|
+
* Genera un string JSON con la configuración del reporte:
|
|
650
|
+
* - codigo: Código del reporte
|
|
651
|
+
* - format: Formato de salida (pdf, excel, word)
|
|
652
|
+
* - hasParams: Si el reporte acepta parámetros adicionales
|
|
653
|
+
* - codEstab: Código de establecimiento (si aplica)
|
|
654
|
+
* - aditionalParams: Array vacío para parámetros adicionales (si aplica)
|
|
655
|
+
*
|
|
656
|
+
* @param docData - Datos del documento
|
|
657
|
+
* @param config - Configuración del tipo de reporte
|
|
658
|
+
* @param format - Formato de salida
|
|
659
|
+
* @returns String JSON con los parámetros del reporte
|
|
660
|
+
* @private
|
|
426
661
|
*/
|
|
427
662
|
private static buildReportParams;
|
|
428
663
|
/**
|
|
429
|
-
* Construye los parámetros de datos
|
|
664
|
+
* Construye los parámetros de datos (dataParams)
|
|
665
|
+
*
|
|
666
|
+
* Genera un string JSON con los datos específicos del reporte.
|
|
667
|
+
* NO incluye hasParams ni configuración, solo datos puros.
|
|
668
|
+
*
|
|
669
|
+
* Incluye automáticamente:
|
|
670
|
+
* - id: ID del documento (si existe)
|
|
671
|
+
* - codEstab: Código de establecimiento (según configuración)
|
|
672
|
+
* - codigo: Código del reporte (según configuración)
|
|
673
|
+
* - Parámetros extra específicos del tipo (extraDataParams)
|
|
674
|
+
* - Todos los parámetros adicionales del docData (excepto codDoc, codEstab, id, serie)
|
|
675
|
+
*
|
|
676
|
+
* @param docData - Datos del documento con parámetros adicionales
|
|
677
|
+
* @param config - Configuración del tipo de reporte
|
|
678
|
+
* @returns String JSON con los datos del reporte (sin hasParams anidado)
|
|
679
|
+
* @private
|
|
680
|
+
*
|
|
681
|
+
* @example
|
|
682
|
+
* ```typescript
|
|
683
|
+
* // Input:
|
|
684
|
+
* docData = { codDoc: 'FG', tipo: 2, codEstab: '001', fechaInicio: '2024-01-01' }
|
|
685
|
+
* config = { idField: 'id', includeEstabInData: false, ... }
|
|
686
|
+
*
|
|
687
|
+
* // Output:
|
|
688
|
+
* "{\"tipo\":2,\"fechaInicio\":\"2024-01-01\"}"
|
|
689
|
+
* ```
|
|
430
690
|
*/
|
|
431
691
|
private static buildDataParams;
|
|
432
692
|
/**
|
|
433
693
|
* Construye las opciones completas para generar un reporte
|
|
434
|
-
|
|
435
|
-
|
|
694
|
+
*
|
|
695
|
+
* @param docData - Datos del documento con codDoc y parámetros adicionales
|
|
696
|
+
* @param format - Formato del reporte: 'pdf' | 'excel' | 'word'
|
|
697
|
+
* @returns Objeto con data (para enviar al backend), format y useV1Api
|
|
698
|
+
*
|
|
699
|
+
* @example
|
|
700
|
+
* ```typescript
|
|
701
|
+
* const options = ReportParamsBuilder.build(
|
|
702
|
+
* { codDoc: ELECTRONIC_DOCUMENT_CODE.FV, id: 123, codEstab: '001' },
|
|
703
|
+
* 'pdf'
|
|
704
|
+
* );
|
|
705
|
+
* // Resultado:
|
|
706
|
+
* // {
|
|
707
|
+
* // data: { hasService: true, reportParams: "{...}", dataParams: "{...}" },
|
|
708
|
+
* // format: 'pdf',
|
|
709
|
+
* // useV1Api: true
|
|
710
|
+
* // }
|
|
711
|
+
*
|
|
712
|
+
* // Usar con facade
|
|
713
|
+
* this.reportFacade.generate(options).subscribe();
|
|
714
|
+
* ```
|
|
715
|
+
*/
|
|
716
|
+
static build(docData: ReportDocumentData, format?: 'pdf' | 'excel' | 'word'): {
|
|
436
717
|
data: ReportParams;
|
|
437
718
|
format: "pdf" | "excel" | "word";
|
|
438
719
|
useV1Api: boolean;
|
|
439
|
-
returnBlob: boolean;
|
|
440
720
|
};
|
|
441
721
|
/**
|
|
442
722
|
* Obtiene la lista de tipos de documento soportados
|
|
723
|
+
*
|
|
724
|
+
* @returns Array con todos los códigos de documento soportados
|
|
725
|
+
*
|
|
726
|
+
* @example
|
|
727
|
+
* ```typescript
|
|
728
|
+
* const types = ReportParamsBuilder.getSupportedDocumentTypes();
|
|
729
|
+
* // ['FV', 'NE', 'NC', 'ND', 'GR', 'SRR', 'SRRC', 'FG', ...]
|
|
730
|
+
* ```
|
|
443
731
|
*/
|
|
444
732
|
static getSupportedDocumentTypes(): string[];
|
|
445
733
|
/**
|
|
446
734
|
* Verifica si un tipo de documento está soportado
|
|
735
|
+
*
|
|
736
|
+
* @param codDoc - Código del documento a verificar
|
|
737
|
+
* @returns true si el documento está soportado, false en caso contrario
|
|
738
|
+
*
|
|
739
|
+
* @example
|
|
740
|
+
* ```typescript
|
|
741
|
+
* if (ReportParamsBuilder.isDocumentTypeSupported('FV')) {
|
|
742
|
+
* // Generar reporte
|
|
743
|
+
* } else {
|
|
744
|
+
* console.error('Tipo de documento no soportado');
|
|
745
|
+
* }
|
|
746
|
+
* ```
|
|
447
747
|
*/
|
|
448
748
|
static isDocumentTypeSupported(codDoc: string): boolean;
|
|
449
749
|
/**
|
|
450
750
|
* Registra un nuevo tipo de reporte dinámicamente
|
|
751
|
+
*
|
|
752
|
+
* Permite agregar soporte para nuevos tipos de reportes en runtime
|
|
753
|
+
* sin modificar el código fuente de la librería.
|
|
754
|
+
*
|
|
755
|
+
* @param codDoc - Código único del documento
|
|
756
|
+
* @param config - Configuración completa del reporte
|
|
757
|
+
*
|
|
758
|
+
* @example
|
|
759
|
+
* ```typescript
|
|
760
|
+
* // Agregar un nuevo tipo de reporte personalizado
|
|
761
|
+
* ReportParamsBuilder.registerReportType('CUSTOM_REPORT', {
|
|
762
|
+
* codigo: 'CUSTOM_REPORT',
|
|
763
|
+
* hasService: true,
|
|
764
|
+
* useV1Api: false,
|
|
765
|
+
* idField: 'id',
|
|
766
|
+
* hasParams: true,
|
|
767
|
+
* extraDataParams: { customField: 'value' }
|
|
768
|
+
* });
|
|
769
|
+
*
|
|
770
|
+
* // Ahora se puede usar
|
|
771
|
+
* const options = ReportParamsBuilder.build(
|
|
772
|
+
* { codDoc: 'CUSTOM_REPORT', id: 123 },
|
|
773
|
+
* 'pdf'
|
|
774
|
+
* );
|
|
775
|
+
* ```
|
|
451
776
|
*/
|
|
452
777
|
static registerReportType(codDoc: string, config: ReportConfig): void;
|
|
453
778
|
}
|