@acontplus/ng-common 1.0.6 → 1.0.8
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.
|
@@ -124,30 +124,82 @@ interface ReportPort {
|
|
|
124
124
|
*/
|
|
125
125
|
declare enum SALE_CODE_REPORT {
|
|
126
126
|
/**
|
|
127
|
-
*
|
|
127
|
+
* REPORTE FACTURA
|
|
128
128
|
*/
|
|
129
|
-
|
|
129
|
+
RF = "RF",
|
|
130
|
+
/**
|
|
131
|
+
* FACTURA GENERAL
|
|
132
|
+
*/
|
|
133
|
+
FG = "FG",
|
|
134
|
+
/**
|
|
135
|
+
* REPORTE NOTA ENTREGA
|
|
136
|
+
*/
|
|
137
|
+
RNE = "RNE",
|
|
138
|
+
/**
|
|
139
|
+
* REPORTE NOTA CREDITO
|
|
140
|
+
*/
|
|
141
|
+
RNC = "RNCC",
|
|
130
142
|
/**
|
|
131
|
-
*
|
|
143
|
+
* NOTA CREDITO GENERAL
|
|
132
144
|
*/
|
|
133
|
-
|
|
145
|
+
NCRG = "NCRG",
|
|
134
146
|
/**
|
|
135
|
-
*
|
|
147
|
+
* REPORTE PROFORMA
|
|
136
148
|
*/
|
|
137
|
-
|
|
149
|
+
PR = "PR",
|
|
150
|
+
/**
|
|
151
|
+
* REPORTE RENTABILIDAD
|
|
152
|
+
*/
|
|
153
|
+
SRR = "SRR",
|
|
154
|
+
/**
|
|
155
|
+
* REPORTE RENTABILIDAD CUSTOM
|
|
156
|
+
*/
|
|
157
|
+
SRRC = "SRRC"
|
|
138
158
|
}
|
|
139
159
|
/**
|
|
140
160
|
* Códigos de reportes de compras
|
|
141
161
|
*/
|
|
142
162
|
declare enum PURCHASE_CODE_REPORT {
|
|
143
163
|
/**
|
|
144
|
-
* REPORTE
|
|
164
|
+
* REPORTE LIQUIDACION COMPRA
|
|
165
|
+
*/
|
|
166
|
+
RLC = "RLC",
|
|
167
|
+
/**
|
|
168
|
+
* REPORTE COMPRA DETALLE
|
|
169
|
+
*/
|
|
170
|
+
RCD = "RCD",
|
|
171
|
+
/**
|
|
172
|
+
* REPORTE FACTURA COMPRA
|
|
173
|
+
*/
|
|
174
|
+
RFC = "RFC",
|
|
175
|
+
/**
|
|
176
|
+
* REPORTE COMPRAS NOTA HIDDEN (No Habitual)
|
|
145
177
|
*/
|
|
146
178
|
RCNH = "RCNH",
|
|
147
179
|
/**
|
|
148
|
-
*
|
|
180
|
+
* ORDEN COMPRA
|
|
149
181
|
*/
|
|
150
|
-
|
|
182
|
+
ROC = "ROC",
|
|
183
|
+
/**
|
|
184
|
+
* REPORTE COMPRAS
|
|
185
|
+
*/
|
|
186
|
+
RCP = "RCP",
|
|
187
|
+
/**
|
|
188
|
+
* REPORTE RECEPCION FACTURA
|
|
189
|
+
*/
|
|
190
|
+
RRF = "RRF",
|
|
191
|
+
/**
|
|
192
|
+
* RECEPCION NOTA CREDITO
|
|
193
|
+
*/
|
|
194
|
+
RRNC = "RRNC",
|
|
195
|
+
/**
|
|
196
|
+
* RECEPCION RETENCION GENERAL
|
|
197
|
+
*/
|
|
198
|
+
RRG = "RRG",
|
|
199
|
+
/**
|
|
200
|
+
* REPORTE RECEPCION NOTA DEBITO
|
|
201
|
+
*/
|
|
202
|
+
RRND = "RRND"
|
|
151
203
|
}
|
|
152
204
|
/**
|
|
153
205
|
* Códigos de reportes de contabilidad
|
|
@@ -164,16 +216,56 @@ declare enum ACCOUNTING_CODE_REPORT {
|
|
|
164
216
|
/**
|
|
165
217
|
* ASIENTO CONTABLE ESTADO LIBRO CAJA
|
|
166
218
|
*/
|
|
167
|
-
ACELC = "ACELC"
|
|
219
|
+
ACELC = "ACELC",
|
|
220
|
+
/**
|
|
221
|
+
* REPORTE CONTROL CAJA
|
|
222
|
+
*/
|
|
223
|
+
RCC = "RCC",
|
|
224
|
+
/**
|
|
225
|
+
* REPORTE MOVIMIENTO CAJA
|
|
226
|
+
*/
|
|
227
|
+
RMIE = "RMIE",
|
|
228
|
+
/**
|
|
229
|
+
* CONTABILIDAD DETALLE CONTROL CAJA
|
|
230
|
+
*/
|
|
231
|
+
CDCC = "CDCC"
|
|
168
232
|
}
|
|
169
233
|
/**
|
|
170
|
-
* Códigos de reportes de clientes
|
|
234
|
+
* Códigos de reportes de clientes y cartera
|
|
171
235
|
*/
|
|
172
236
|
declare enum CUSTOMER_CODE_REPORT {
|
|
173
237
|
/**
|
|
174
238
|
* REPORTE CLIENTE LISTADO
|
|
175
239
|
*/
|
|
176
|
-
RCL = "RCL"
|
|
240
|
+
RCL = "RCL",
|
|
241
|
+
/**
|
|
242
|
+
* CUENTA POR COBRAR
|
|
243
|
+
*/
|
|
244
|
+
CCR = "CCR",
|
|
245
|
+
/**
|
|
246
|
+
* CONTABILIDAD CARTERA PROVEEDOR
|
|
247
|
+
*/
|
|
248
|
+
CCP = "CCP",
|
|
249
|
+
/**
|
|
250
|
+
* CONTABILIDAD CARTERA PROVEEDOR CUOTA
|
|
251
|
+
*/
|
|
252
|
+
CCPC = "CCPC",
|
|
253
|
+
/**
|
|
254
|
+
* CONTABILIDAD COBROS POR CUOTAS
|
|
255
|
+
*/
|
|
256
|
+
RCXC = "RCXC",
|
|
257
|
+
/**
|
|
258
|
+
* CONTABILIDAD COBROS POR DOCUMENTOS
|
|
259
|
+
*/
|
|
260
|
+
RCXD = "RCXD",
|
|
261
|
+
/**
|
|
262
|
+
* CONTABILIDAD COBROS POR PAGOS
|
|
263
|
+
*/
|
|
264
|
+
RCXP = "RCXP",
|
|
265
|
+
/**
|
|
266
|
+
* REPORTE ANTICIPO
|
|
267
|
+
*/
|
|
268
|
+
RA = "RA"
|
|
177
269
|
}
|
|
178
270
|
/**
|
|
179
271
|
* Códigos de reportes de inventario
|
|
@@ -249,6 +341,32 @@ declare enum ELECTRONIC_DOCUMENT_CODE {
|
|
|
249
341
|
*/
|
|
250
342
|
NORMAL = "NORMAL"
|
|
251
343
|
}
|
|
344
|
+
/**
|
|
345
|
+
* Códigos de reporte de Facturación Electrónico
|
|
346
|
+
*/
|
|
347
|
+
declare enum BILLING_CODE_REPORT {
|
|
348
|
+
/**
|
|
349
|
+
* FACTURACION ELECTRONICA GENERAL
|
|
350
|
+
*/
|
|
351
|
+
FEG = "FEG",
|
|
352
|
+
/**
|
|
353
|
+
* REPORTE RETENCION
|
|
354
|
+
*/
|
|
355
|
+
RRC = "RRC"
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Códigos de aprobación de documentos
|
|
359
|
+
*/
|
|
360
|
+
declare enum APPROVAL_CODE_REPORT {
|
|
361
|
+
/**
|
|
362
|
+
* APROBACION FACTURA
|
|
363
|
+
*/
|
|
364
|
+
PRE_F = "RAC",
|
|
365
|
+
/**
|
|
366
|
+
* APROBACION NOTA ENTREGA
|
|
367
|
+
*/
|
|
368
|
+
P_NE = "P-NE"
|
|
369
|
+
}
|
|
252
370
|
/**
|
|
253
371
|
* Formatos de reporte disponibles
|
|
254
372
|
*/
|
|
@@ -257,6 +375,15 @@ declare enum REPORT_FORMAT {
|
|
|
257
375
|
EXCEL = "excel",
|
|
258
376
|
WORD = "word"
|
|
259
377
|
}
|
|
378
|
+
/**
|
|
379
|
+
* Códigos de soporte técnico
|
|
380
|
+
*/
|
|
381
|
+
declare enum TECHNICAL_SUPPORT_CODE_REPORT {
|
|
382
|
+
/**
|
|
383
|
+
* REPORTE SOPORTE TECNICO
|
|
384
|
+
*/
|
|
385
|
+
RTS = "RTS"
|
|
386
|
+
}
|
|
260
387
|
|
|
261
388
|
declare const API_PATHS: {
|
|
262
389
|
readonly WHATSAPP: "common/whatsapp-cloud";
|
|
@@ -568,13 +695,25 @@ declare class PrinterAdapter implements PrinterPort {
|
|
|
568
695
|
static ɵprov: i0.ɵɵInjectableDeclaration<PrinterAdapter>;
|
|
569
696
|
}
|
|
570
697
|
|
|
698
|
+
/**
|
|
699
|
+
* Tipo union con todos los códigos de reporte soportados
|
|
700
|
+
*/
|
|
701
|
+
type ReportCode = SALE_CODE_REPORT | PURCHASE_CODE_REPORT | ACCOUNTING_CODE_REPORT | CUSTOMER_CODE_REPORT | INVENTORY_CODE_REPORT | ELECTRONIC_DOCUMENT_CODE | APPROVAL_CODE_REPORT | TECHNICAL_SUPPORT_CODE_REPORT | BILLING_CODE_REPORT;
|
|
571
702
|
interface ReportDocumentData {
|
|
572
|
-
codDoc
|
|
703
|
+
codDoc?: string;
|
|
573
704
|
codEstab?: string;
|
|
574
705
|
id?: number;
|
|
575
706
|
serie?: string;
|
|
576
707
|
[key: string]: any;
|
|
577
708
|
}
|
|
709
|
+
/**
|
|
710
|
+
* Opciones para construir un reporte
|
|
711
|
+
*/
|
|
712
|
+
interface BuildReportOptions {
|
|
713
|
+
codeReport: ReportCode | string;
|
|
714
|
+
data: ReportDocumentData;
|
|
715
|
+
format?: 'pdf' | 'excel' | 'word';
|
|
716
|
+
}
|
|
578
717
|
interface ReportParams {
|
|
579
718
|
hasService?: boolean;
|
|
580
719
|
reportParams: string;
|
|
@@ -584,7 +723,7 @@ interface ReportConfig {
|
|
|
584
723
|
codigo: string;
|
|
585
724
|
hasService: boolean;
|
|
586
725
|
useV1Api: boolean;
|
|
587
|
-
idField
|
|
726
|
+
idField?: string;
|
|
588
727
|
extraDataParams?: Record<string, any>;
|
|
589
728
|
includeEstabInData?: boolean;
|
|
590
729
|
includeCodigoInData?: boolean;
|
|
@@ -599,45 +738,55 @@ declare class ReportParamsBuilder {
|
|
|
599
738
|
/**
|
|
600
739
|
* Construye los parámetros de reporte según el tipo de documento
|
|
601
740
|
*
|
|
602
|
-
* @param
|
|
741
|
+
* @param codeReport - Código del reporte (FG, SRR, FV, RCNH, etc.)
|
|
742
|
+
* @param docData - Datos del documento con parámetros adicionales
|
|
603
743
|
* @param format - Formato del reporte: 'pdf' | 'excel' | 'word'
|
|
604
744
|
* @returns Objeto con hasService, reportParams (string JSON) y dataParams (string JSON)
|
|
605
745
|
*
|
|
606
746
|
* @example
|
|
607
747
|
* ```typescript
|
|
608
748
|
* const params = ReportParamsBuilder.buildParams(
|
|
609
|
-
*
|
|
749
|
+
* SALE_CODE_REPORT.FG,
|
|
750
|
+
* { codDoc: '01', tipo: 2, codEstab: '001' },
|
|
610
751
|
* 'pdf'
|
|
611
752
|
* );
|
|
612
753
|
* // Resultado:
|
|
613
754
|
* // {
|
|
614
755
|
* // hasService: true,
|
|
615
|
-
* // reportParams: "{\"codigo\":\"
|
|
616
|
-
* // dataParams: "{\"
|
|
756
|
+
* // reportParams: "{\"codigo\":\"FG\",\"format\":\"pdf\",\"hasParams\":false}",
|
|
757
|
+
* // dataParams: "{\"codDoc\":\"01\",\"tipo\":2,\"codEstab\":\"001\"}"
|
|
617
758
|
* // }
|
|
618
759
|
* ```
|
|
619
760
|
*/
|
|
620
|
-
static buildParams(docData: ReportDocumentData, format?: 'pdf' | 'excel' | 'word'): ReportParams;
|
|
761
|
+
static buildParams(codeReport: ReportCode | string, docData: ReportDocumentData, format?: 'pdf' | 'excel' | 'word'): ReportParams;
|
|
621
762
|
/**
|
|
622
|
-
* Determina si debe usar la API v1 según el
|
|
763
|
+
* Determina si debe usar la API v1 o v2 según el código de reporte
|
|
764
|
+
*
|
|
765
|
+
* Algunos reportes (como documentos electrónicos) usan API v1,
|
|
766
|
+
* mientras que otros (reportes de ventas, inventario) usan API v2.
|
|
623
767
|
*
|
|
624
|
-
* @param
|
|
625
|
-
* @returns true
|
|
768
|
+
* @param codeReport - Código del reporte
|
|
769
|
+
* @returns true para API v1, false para API v2
|
|
626
770
|
*
|
|
627
771
|
* @example
|
|
628
772
|
* ```typescript
|
|
773
|
+
* // Documentos electrónicos usan v1
|
|
629
774
|
* const useV1 = ReportParamsBuilder.shouldUseV1Api(ELECTRONIC_DOCUMENT_CODE.FV);
|
|
630
|
-
*
|
|
775
|
+
* console.log(useV1); // true
|
|
631
776
|
*
|
|
777
|
+
* // Reportes de ventas usan v2
|
|
632
778
|
* const useV1Sales = ReportParamsBuilder.shouldUseV1Api(SALE_CODE_REPORT.FG);
|
|
633
|
-
*
|
|
779
|
+
* console.log(useV1Sales); // false
|
|
780
|
+
*
|
|
781
|
+
* // Uso manual (normalmente no necesario, build() lo hace automáticamente)
|
|
782
|
+
* const apiVersion = useV1 ? '/reporte/download' : '/v2/reporte/download';
|
|
634
783
|
* ```
|
|
635
784
|
*/
|
|
636
|
-
static shouldUseV1Api(
|
|
785
|
+
static shouldUseV1Api(codeReport: ReportCode | string): boolean;
|
|
637
786
|
/**
|
|
638
787
|
* Obtiene la configuración para un tipo de documento
|
|
639
788
|
*
|
|
640
|
-
* @param
|
|
789
|
+
* @param codeReport - Código del reporte (FG, SRR, FV, etc.)
|
|
641
790
|
* @returns Configuración del reporte
|
|
642
791
|
* @throws Error si el tipo de documento no está soportado
|
|
643
792
|
* @private
|
|
@@ -671,7 +820,7 @@ declare class ReportParamsBuilder {
|
|
|
671
820
|
* - codEstab: Código de establecimiento (según configuración)
|
|
672
821
|
* - codigo: Código del reporte (según configuración)
|
|
673
822
|
* - Parámetros extra específicos del tipo (extraDataParams)
|
|
674
|
-
* - Todos los parámetros adicionales del docData (excepto
|
|
823
|
+
* - Todos los parámetros adicionales del docData (excepto codEstab, id, serie)
|
|
675
824
|
*
|
|
676
825
|
* @param docData - Datos del documento con parámetros adicionales
|
|
677
826
|
* @param config - Configuración del tipo de reporte
|
|
@@ -681,100 +830,171 @@ declare class ReportParamsBuilder {
|
|
|
681
830
|
* @example
|
|
682
831
|
* ```typescript
|
|
683
832
|
* // Input:
|
|
684
|
-
* docData = { codDoc: '
|
|
833
|
+
* docData = { codDoc: '01', tipo: 2, codEstab: '001', fechaInicio: '2024-01-01' }
|
|
685
834
|
* config = { idField: 'id', includeEstabInData: false, ... }
|
|
686
835
|
*
|
|
687
836
|
* // Output:
|
|
688
|
-
* "{\"tipo\":2,\"fechaInicio\":\"2024-01-01\"}"
|
|
837
|
+
* "{\"codDoc\":\"01\",\"tipo\":2,\"fechaInicio\":\"2024-01-01\"}"
|
|
689
838
|
* ```
|
|
690
839
|
*/
|
|
691
840
|
private static buildDataParams;
|
|
692
841
|
/**
|
|
693
842
|
* Construye las opciones completas para generar un reporte
|
|
694
843
|
*
|
|
695
|
-
* @param
|
|
844
|
+
* @param codeReport - Código del reporte (FG, SRR, FV, RCNH, etc.) - REQUERIDO
|
|
845
|
+
* @param docData - Datos del documento con parámetros adicionales (sin codeReport)
|
|
696
846
|
* @param format - Formato del reporte: 'pdf' | 'excel' | 'word'
|
|
697
|
-
|
|
847
|
+
/**
|
|
848
|
+
* Construye las opciones completas para generar un reporte
|
|
849
|
+
*
|
|
850
|
+
* Método principal que acepta un objeto con opciones tipadas.
|
|
851
|
+
* Proporciona IntelliSense y validación de tipos en tiempo de desarrollo.
|
|
852
|
+
*
|
|
853
|
+
* @param options - Opciones del reporte
|
|
854
|
+
* @param options.codeReport - Código del reporte (tipado: SALE_CODE_REPORT, PURCHASE_CODE_REPORT, etc.)
|
|
855
|
+
* @param options.data - Datos del documento (codDoc, tipo, fechas, etc.)
|
|
856
|
+
* @param options.format - Formato de salida: 'pdf' | 'excel' | 'word' (opcional, por defecto 'pdf')
|
|
857
|
+
* @returns Objeto con data, format y useV1Api para enviar a la facade
|
|
698
858
|
*
|
|
699
859
|
* @example
|
|
700
860
|
* ```typescript
|
|
701
|
-
*
|
|
702
|
-
*
|
|
703
|
-
*
|
|
704
|
-
*
|
|
705
|
-
*
|
|
706
|
-
*
|
|
707
|
-
*
|
|
708
|
-
*
|
|
709
|
-
*
|
|
710
|
-
*
|
|
861
|
+
* // Ejemplo 1: Reporte de ventas
|
|
862
|
+
* const options = ReportParamsBuilder.build({
|
|
863
|
+
* codeReport: SALE_CODE_REPORT.FG,
|
|
864
|
+
* data: {
|
|
865
|
+
* tipo: 2,
|
|
866
|
+
* ckFecha: true,
|
|
867
|
+
* codEstab: 'ESTAB-000000216',
|
|
868
|
+
* fechaInicio: '2024-01-01',
|
|
869
|
+
* fechaFin: '2024-12-31',
|
|
870
|
+
* userRoleId: '307'
|
|
871
|
+
* },
|
|
872
|
+
* format: 'pdf'
|
|
873
|
+
* });
|
|
874
|
+
*
|
|
875
|
+
* // Ejemplo 2: Documento electrónico con codDoc variable
|
|
876
|
+
* const options2 = ReportParamsBuilder.build({
|
|
877
|
+
* codeReport: ELECTRONIC_DOCUMENT_CODE.FV,
|
|
878
|
+
* data: {
|
|
879
|
+
* id: 123,
|
|
880
|
+
* codDoc: '01', // ← Variable, va a dataParams
|
|
881
|
+
* codEstab: '001'
|
|
882
|
+
* }
|
|
883
|
+
* // format es opcional, por defecto 'pdf'
|
|
884
|
+
* });
|
|
885
|
+
*
|
|
886
|
+
* // Ejemplo 3: Reporte de inventario
|
|
887
|
+
* const options3 = ReportParamsBuilder.build({
|
|
888
|
+
* codeReport: INVENTORY_CODE_REPORT.ARTICULO_PVP,
|
|
889
|
+
* data: {
|
|
890
|
+
* tipo: 2,
|
|
891
|
+
* stockStatusCode: 1,
|
|
892
|
+
* idTarifa: 3
|
|
893
|
+
* },
|
|
894
|
+
* format: 'excel'
|
|
895
|
+
* });
|
|
711
896
|
*
|
|
712
897
|
* // Usar con facade
|
|
713
|
-
* this.reportFacade.
|
|
898
|
+
* this.reportFacade.open(options).subscribe();
|
|
899
|
+
* this.reportFacade.download(options2).subscribe();
|
|
714
900
|
* ```
|
|
715
901
|
*/
|
|
716
|
-
static build(
|
|
902
|
+
static build(options: BuildReportOptions): {
|
|
717
903
|
data: ReportParams;
|
|
718
904
|
format: "pdf" | "excel" | "word";
|
|
719
905
|
useV1Api: boolean;
|
|
720
906
|
};
|
|
721
907
|
/**
|
|
722
|
-
* Obtiene la lista de
|
|
908
|
+
* Obtiene la lista de códigos de reporte soportados
|
|
723
909
|
*
|
|
724
|
-
*
|
|
910
|
+
* Devuelve un array con todos los códigos de reporte configurados
|
|
911
|
+
* en el builder (FV, NE, FG, SRR, RCNH, etc.)
|
|
912
|
+
*
|
|
913
|
+
* @returns Array con todos los códigos de reporte disponibles
|
|
725
914
|
*
|
|
726
915
|
* @example
|
|
727
916
|
* ```typescript
|
|
728
917
|
* const types = ReportParamsBuilder.getSupportedDocumentTypes();
|
|
729
|
-
*
|
|
918
|
+
* console.log(types);
|
|
919
|
+
* // ['FV', 'NE', 'NC', 'ND', 'GR', 'NORMAL', 'SRR', 'SRRC', 'FG',
|
|
920
|
+
* // 'RCNH', 'RLC', 'RCEGR', 'ACEDFP', 'ACELC', 'RCL', 'RK', ...]
|
|
921
|
+
*
|
|
922
|
+
* // Usar para validación
|
|
923
|
+
* if (types.includes(myCode)) {
|
|
924
|
+
* // Código válido
|
|
925
|
+
* }
|
|
730
926
|
* ```
|
|
731
927
|
*/
|
|
732
928
|
static getSupportedDocumentTypes(): string[];
|
|
733
929
|
/**
|
|
734
|
-
* Verifica si un
|
|
930
|
+
* Verifica si un código de reporte está soportado
|
|
931
|
+
*
|
|
932
|
+
* Útil para validar códigos antes de generar reportes,
|
|
933
|
+
* especialmente cuando el código viene dinámicamente.
|
|
735
934
|
*
|
|
736
|
-
* @param
|
|
737
|
-
* @returns true si el
|
|
935
|
+
* @param codeReport - Código del reporte a verificar
|
|
936
|
+
* @returns true si el código está soportado, false en caso contrario
|
|
738
937
|
*
|
|
739
938
|
* @example
|
|
740
939
|
* ```typescript
|
|
741
|
-
*
|
|
742
|
-
*
|
|
940
|
+
* // Validación con enum
|
|
941
|
+
* if (ReportParamsBuilder.isDocumentTypeSupported(SALE_CODE_REPORT.FG)) {
|
|
942
|
+
* console.log('Código FG soportado');
|
|
943
|
+
* }
|
|
944
|
+
*
|
|
945
|
+
* // Validación con string dinámico
|
|
946
|
+
* const dynamicCode = getUserSelectedCode();
|
|
947
|
+
* if (ReportParamsBuilder.isDocumentTypeSupported(dynamicCode)) {
|
|
948
|
+
* const options = ReportParamsBuilder.build({
|
|
949
|
+
* codeReport: dynamicCode,
|
|
950
|
+
* data: {...}
|
|
951
|
+
* });
|
|
743
952
|
* } else {
|
|
744
|
-
* console.error('
|
|
953
|
+
* console.error('Código no soportado:', dynamicCode);
|
|
745
954
|
* }
|
|
746
955
|
* ```
|
|
747
956
|
*/
|
|
748
|
-
static isDocumentTypeSupported(
|
|
957
|
+
static isDocumentTypeSupported(codeReport: ReportCode | string): boolean;
|
|
749
958
|
/**
|
|
750
959
|
* Registra un nuevo tipo de reporte dinámicamente
|
|
751
960
|
*
|
|
752
|
-
* Permite agregar soporte para
|
|
961
|
+
* Permite agregar soporte para códigos de reporte personalizados
|
|
753
962
|
* sin modificar el código fuente de la librería.
|
|
963
|
+
* Útil para reportes específicos de cada aplicación.
|
|
754
964
|
*
|
|
755
|
-
* @param
|
|
965
|
+
* @param codeReport - Código único del reporte personalizado
|
|
756
966
|
* @param config - Configuración completa del reporte
|
|
757
967
|
*
|
|
758
968
|
* @example
|
|
759
969
|
* ```typescript
|
|
760
|
-
* //
|
|
761
|
-
* ReportParamsBuilder.registerReportType('
|
|
762
|
-
* codigo: '
|
|
970
|
+
* // Registrar un reporte personalizado
|
|
971
|
+
* ReportParamsBuilder.registerReportType('MI_REPORTE_CUSTOM', {
|
|
972
|
+
* codigo: 'MI_REPORTE_CUSTOM',
|
|
763
973
|
* hasService: true,
|
|
764
974
|
* useV1Api: false,
|
|
765
975
|
* idField: 'id',
|
|
766
976
|
* hasParams: true,
|
|
767
|
-
*
|
|
977
|
+
* includeEstabInData: true,
|
|
978
|
+
* extraDataParams: {
|
|
979
|
+
* tipoCustom: 'especial',
|
|
980
|
+
* version: 2
|
|
981
|
+
* }
|
|
768
982
|
* });
|
|
769
983
|
*
|
|
770
|
-
* // Ahora se puede usar
|
|
771
|
-
* const options = ReportParamsBuilder.build(
|
|
772
|
-
*
|
|
773
|
-
* '
|
|
774
|
-
*
|
|
984
|
+
* // Ahora se puede usar como cualquier otro reporte
|
|
985
|
+
* const options = ReportParamsBuilder.build({
|
|
986
|
+
* codeReport: 'MI_REPORTE_CUSTOM',
|
|
987
|
+
* data: { id: 123, codEstab: '001' },
|
|
988
|
+
* format: 'pdf'
|
|
989
|
+
* });
|
|
990
|
+
*
|
|
991
|
+
* // Verificar si fue registrado
|
|
992
|
+
* console.log(
|
|
993
|
+
* ReportParamsBuilder.isDocumentTypeSupported('MI_REPORTE_CUSTOM')
|
|
994
|
+
* ); // true
|
|
775
995
|
* ```
|
|
776
996
|
*/
|
|
777
|
-
static registerReportType(
|
|
997
|
+
static registerReportType(codeReport: string, config: ReportConfig): void;
|
|
778
998
|
}
|
|
779
999
|
|
|
780
1000
|
interface DocumentDeliveryData {
|
|
@@ -932,5 +1152,5 @@ declare class WhatsAppSender implements OnInit {
|
|
|
932
1152
|
static ɵcmp: i0.ɵɵComponentDeclaration<WhatsAppSender, "acp-whatsapp-sender", never, { "config": { "alias": "config"; "required": false; }; }, {}, never, never, true, never>;
|
|
933
1153
|
}
|
|
934
1154
|
|
|
935
|
-
export { ACCOUNTING_CODE_REPORT, API_PATHS, CUSTOMER_CODE_REPORT, DOCUMENT_TYPES, ELECTRONIC_DOCUMENT_CODE, FileMapperUtil, GreenWhatsAppAdapter, INVENTORY_CODE_REPORT, MetaWhatsAppAdapter, PRINTER_PORT, PURCHASE_CODE_REPORT, PhoneFormatterUtil, PrinterAdapter, PrinterFacade, REPORT_FORMAT, REPORT_PORT, ReportAdapter, ReportFacade, ReportParamsBuilder, SALE_CODE_REPORT, WHATSAPP_MESSAGING_PORT, WhatsAppMessageBuilder, WhatsAppMessagingFacade, WhatsAppSender };
|
|
936
|
-
export type { ApiResponse, DocumentData, DocumentDeliveryData, DocumentDeliveryParams, PhoneValidationResult, PrintConfig, PrintParams, PrinterPort, ReportDocumentData, ReportOptions, ReportParams, ReportPort, WhatsAppDocumentMessage, WhatsAppDocumentRequest, WhatsAppDocumentTemplateMessage, WhatsAppDocumentTemplateRequest, WhatsAppMessageResponse, WhatsAppMessages, WhatsAppMessagingPort, WhatsAppProviderStatus, WhatsAppResponse, WhatsAppSendConfig, WhatsAppStatusResponse, WhatsAppTemplateMessage, WhatsAppTextMessage, WhatsAppTextRequest, WhatsAppTextTemplateRequest };
|
|
1155
|
+
export { ACCOUNTING_CODE_REPORT, API_PATHS, APPROVAL_CODE_REPORT, BILLING_CODE_REPORT, CUSTOMER_CODE_REPORT, DOCUMENT_TYPES, ELECTRONIC_DOCUMENT_CODE, FileMapperUtil, GreenWhatsAppAdapter, INVENTORY_CODE_REPORT, MetaWhatsAppAdapter, PRINTER_PORT, PURCHASE_CODE_REPORT, PhoneFormatterUtil, PrinterAdapter, PrinterFacade, REPORT_FORMAT, REPORT_PORT, ReportAdapter, ReportFacade, ReportParamsBuilder, SALE_CODE_REPORT, TECHNICAL_SUPPORT_CODE_REPORT, WHATSAPP_MESSAGING_PORT, WhatsAppMessageBuilder, WhatsAppMessagingFacade, WhatsAppSender };
|
|
1156
|
+
export type { ApiResponse, BuildReportOptions, DocumentData, DocumentDeliveryData, DocumentDeliveryParams, PhoneValidationResult, PrintConfig, PrintParams, PrinterPort, ReportCode, ReportDocumentData, ReportOptions, ReportParams, ReportPort, WhatsAppDocumentMessage, WhatsAppDocumentRequest, WhatsAppDocumentTemplateMessage, WhatsAppDocumentTemplateRequest, WhatsAppMessageResponse, WhatsAppMessages, WhatsAppMessagingPort, WhatsAppProviderStatus, WhatsAppResponse, WhatsAppSendConfig, WhatsAppStatusResponse, WhatsAppTemplateMessage, WhatsAppTextMessage, WhatsAppTextRequest, WhatsAppTextTemplateRequest };
|