ngx-dsxlibrary 1.21.24 → 1.21.25

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.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-dsxlibrary",
3
- "version": "1.21.24",
3
+ "version": "1.21.25",
4
4
  "description": "Libreria para control de código automatizado.",
5
5
  "author": "DevSoftXela",
6
6
  "dependencies": {
@@ -1039,6 +1039,21 @@ declare function createTypedCacheProvider<T extends Record<string, string>>(toke
1039
1039
  provider: Provider;
1040
1040
  };
1041
1041
 
1042
+ declare class DteService {
1043
+ /** Servicio HttpClient para realizar peticiones HTTP */
1044
+ private http;
1045
+ /**
1046
+ * Configuración del entorno inyectada mediante el token ENVIRONMENT.
1047
+ * La validación se realiza automáticamente al usar provideEnvironment().
1048
+ */
1049
+ private environment;
1050
+ /** URL base de la API JWT construida desde la configuración del entorno */
1051
+ private SeguridadITApi;
1052
+ pdfDTE(UUID: string): Observable<Blob>;
1053
+ static ɵfac: i0.ɵɵFactoryDeclaration<DteService, never>;
1054
+ static ɵprov: i0.ɵɵInjectableDeclaration<DteService>;
1055
+ }
1056
+
1042
1057
  declare class EndpointService<T> {
1043
1058
  private http;
1044
1059
  private environment;
@@ -1404,10 +1419,47 @@ declare class UtilityAddService {
1404
1419
  * @param actionId 0 para abrir en nueva ventana, 1 para descargar
1405
1420
  * @param fileName Nombre del archivo sin extensión
1406
1421
  */
1407
- handleFileResponse(fileObservable: Observable<Blob>, actionId: number, fileName: string): void;
1422
+ handleFileResponse(fileObservable: Observable<Blob>, actionId: number | undefined, fileName: string): void;
1408
1423
  private isExcelFile;
1409
1424
  private getFileExtension;
1410
1425
  private handleNonExcelFiles;
1426
+ /**
1427
+ * Abre un archivo PDF en una nueva pestaña del navegador.
1428
+ *
1429
+ * @param blob - Objeto Blob que contiene los datos del archivo PDF.
1430
+ *
1431
+ * @example
1432
+ * // Uso típico con respuesta de servicio HTTP
1433
+ * this.pdfService.getPdf(id).subscribe(blob => {
1434
+ * this.utilityAddService.PdfView(blob);
1435
+ * });
1436
+ *
1437
+ * @description
1438
+ * Este método crea un URL temporal para el Blob del PDF y lo abre en una nueva
1439
+ * pestaña del navegador. El URL se revoca automáticamente después de 100ms para
1440
+ * liberar memoria.
1441
+ */
1442
+ PdfView(blob: Blob): any;
1443
+ /**
1444
+ * Descarga un archivo PDF con un nombre personalizado que incluye el prefijo "DTE_".
1445
+ *
1446
+ * @param blob - Objeto Blob que contiene los datos del archivo PDF a descargar.
1447
+ * @param filename - Nombre base del archivo sin extensión (se agregará automáticamente ".pdf" y el prefijo "DTE_").
1448
+ *
1449
+ * @example
1450
+ * // Uso típico con respuesta de servicio HTTP
1451
+ * this.dteService.getDTE(operacionId).subscribe(blob => {
1452
+ * this.utilityAddService.downloadPdfFile(blob, '12345');
1453
+ * // Descarga el archivo como: DTE_12345.pdf
1454
+ * });
1455
+ *
1456
+ * @description
1457
+ * Este método crea un URL temporal para el Blob y simula un clic en un enlace de
1458
+ * descarga para iniciar la descarga automática del archivo. El nombre del archivo
1459
+ * sigue el formato: DTE_{filename}.pdf. El URL se revoca después de 100ms para
1460
+ * liberar memoria.
1461
+ */
1462
+ downloadPdfFile(blob: Blob, filename: string): void;
1411
1463
  private forceDownload;
1412
1464
  private revokeObjectUrl;
1413
1465
  /**
@@ -1558,5 +1610,5 @@ declare function nitValidator(control: AbstractControl): ValidationErrors | null
1558
1610
  */
1559
1611
  declare function cuiValidator(control: AbstractControl): ValidationErrors | null;
1560
1612
 
1561
- export { AlertaService, AppMessageErrorComponent, AuthorizeService, CACHE_KEYS, CacheService, CssV2Component, DsxAddToolsModule, ENVIRONMENT, EndpointService, ErrorHandlerService, INITIAL_PARAMETERS, IconDsxComponent, JsonHighlightPipe, JsonValuesDebujComponent, KpicardComponent, LoadingComponent, LoadingLottieComponent, NavbarDsxComponent, OnlyRangoPatternDirective, ParameterValuesService, PrimeNgModule, SWEET_ALERT_THEMES, SecurityService, SelectAllOnFocusDirective, TruncatePipe, UtilityAddService, atLeastOneFieldRequiredValidator, createInitialCache, createTypedCacheProvider, cuiValidator, dateMinMaxValidator, dateRangeValidator, httpAuthorizeInterceptor, nitValidator, provideEnvironment, validateEnvironmentConfig };
1613
+ export { AlertaService, AppMessageErrorComponent, AuthorizeService, CACHE_KEYS, CacheService, CssV2Component, DsxAddToolsModule, DteService, ENVIRONMENT, EndpointService, ErrorHandlerService, INITIAL_PARAMETERS, IconDsxComponent, JsonHighlightPipe, JsonValuesDebujComponent, KpicardComponent, LoadingComponent, LoadingLottieComponent, NavbarDsxComponent, OnlyRangoPatternDirective, ParameterValuesService, PrimeNgModule, SWEET_ALERT_THEMES, SecurityService, SelectAllOnFocusDirective, TruncatePipe, UtilityAddService, atLeastOneFieldRequiredValidator, createInitialCache, createTypedCacheProvider, cuiValidator, dateMinMaxValidator, dateRangeValidator, httpAuthorizeInterceptor, nitValidator, provideEnvironment, validateEnvironmentConfig };
1562
1614
  export type { Certificacion, Column, Complemento, Complementos, DatosEmision, DatosGenerales, Direccion, DocumentoFelResponse, Dte, Emisor, EnvironmentConfig, ExportColumn, FechasConversion, FieldConfig, FilterOption, Frase, Frases, Impuesto, Impuestos, InferCacheKeyType, InferCacheOptions, Item, Items, MyParameterValues, NITResponse, NumeroAutorizacion, ParameterSecurity, ParameterValue, Receptor, ResponseHttpModel, Sat, SeguridadITParameter, ServiceResult, ServiceResultVoid, SweetAlertThemeType, T, TipoFechaConversion, TotalImpuesto, Totales, typeModel };
Binary file