ngx-dsxlibrary 1.21.24 → 1.21.26

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.26",
4
4
  "description": "Libreria para control de código automatizado.",
5
5
  "author": "DevSoftXela",
6
6
  "dependencies": {
@@ -230,6 +230,8 @@ interface ServiceResult<T> {
230
230
  data: T | null;
231
231
  /** Indica si la operación fue exitosa */
232
232
  isSuccess: boolean;
233
+ /** Título de la respuesta */
234
+ title: string;
233
235
  /** Mensaje descriptivo del resultado de la operación */
234
236
  message: string;
235
237
  }
@@ -673,6 +673,8 @@ interface ServiceResult<T> {
673
673
  data: T | null;
674
674
  /** Indica si la operación fue exitosa */
675
675
  isSuccess: boolean;
676
+ /** Título de la respuesta */
677
+ title: string;
676
678
  /** Mensaje descriptivo del resultado de la operación */
677
679
  message: string;
678
680
  }
@@ -1039,6 +1041,21 @@ declare function createTypedCacheProvider<T extends Record<string, string>>(toke
1039
1041
  provider: Provider;
1040
1042
  };
1041
1043
 
1044
+ declare class DteService {
1045
+ /** Servicio HttpClient para realizar peticiones HTTP */
1046
+ private http;
1047
+ /**
1048
+ * Configuración del entorno inyectada mediante el token ENVIRONMENT.
1049
+ * La validación se realiza automáticamente al usar provideEnvironment().
1050
+ */
1051
+ private environment;
1052
+ /** URL base de la API JWT construida desde la configuración del entorno */
1053
+ private SeguridadITApi;
1054
+ pdfDTE(UUID: string): Observable<Blob>;
1055
+ static ɵfac: i0.ɵɵFactoryDeclaration<DteService, never>;
1056
+ static ɵprov: i0.ɵɵInjectableDeclaration<DteService>;
1057
+ }
1058
+
1042
1059
  declare class EndpointService<T> {
1043
1060
  private http;
1044
1061
  private environment;
@@ -1404,10 +1421,47 @@ declare class UtilityAddService {
1404
1421
  * @param actionId 0 para abrir en nueva ventana, 1 para descargar
1405
1422
  * @param fileName Nombre del archivo sin extensión
1406
1423
  */
1407
- handleFileResponse(fileObservable: Observable<Blob>, actionId: number, fileName: string): void;
1424
+ handleFileResponse(fileObservable: Observable<Blob>, actionId: number | undefined, fileName: string): void;
1408
1425
  private isExcelFile;
1409
1426
  private getFileExtension;
1410
1427
  private handleNonExcelFiles;
1428
+ /**
1429
+ * Abre un archivo PDF en una nueva pestaña del navegador.
1430
+ *
1431
+ * @param blob - Objeto Blob que contiene los datos del archivo PDF.
1432
+ *
1433
+ * @example
1434
+ * // Uso típico con respuesta de servicio HTTP
1435
+ * this.pdfService.getPdf(id).subscribe(blob => {
1436
+ * this.utilityAddService.PdfView(blob);
1437
+ * });
1438
+ *
1439
+ * @description
1440
+ * Este método crea un URL temporal para el Blob del PDF y lo abre en una nueva
1441
+ * pestaña del navegador. El URL se revoca automáticamente después de 100ms para
1442
+ * liberar memoria.
1443
+ */
1444
+ PdfView(blob: Blob): any;
1445
+ /**
1446
+ * Descarga un archivo PDF con un nombre personalizado que incluye el prefijo "DTE_".
1447
+ *
1448
+ * @param blob - Objeto Blob que contiene los datos del archivo PDF a descargar.
1449
+ * @param filename - Nombre base del archivo sin extensión (se agregará automáticamente ".pdf" y el prefijo "DTE_").
1450
+ *
1451
+ * @example
1452
+ * // Uso típico con respuesta de servicio HTTP
1453
+ * this.dteService.getDTE(operacionId).subscribe(blob => {
1454
+ * this.utilityAddService.downloadPdfFile(blob, '12345');
1455
+ * // Descarga el archivo como: DTE_12345.pdf
1456
+ * });
1457
+ *
1458
+ * @description
1459
+ * Este método crea un URL temporal para el Blob y simula un clic en un enlace de
1460
+ * descarga para iniciar la descarga automática del archivo. El nombre del archivo
1461
+ * sigue el formato: DTE_{filename}.pdf. El URL se revoca después de 100ms para
1462
+ * liberar memoria.
1463
+ */
1464
+ downloadPdfFile(blob: Blob, filename: string): void;
1411
1465
  private forceDownload;
1412
1466
  private revokeObjectUrl;
1413
1467
  /**
@@ -1558,5 +1612,5 @@ declare function nitValidator(control: AbstractControl): ValidationErrors | null
1558
1612
  */
1559
1613
  declare function cuiValidator(control: AbstractControl): ValidationErrors | null;
1560
1614
 
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 };
1615
+ 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
1616
  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