@experteam-mx/ngx-services 20.9.1-dev3.2 → 20.9.1-dev3.4

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.
@@ -59,6 +59,86 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
59
59
  }]
60
60
  }] });
61
61
 
62
+ class ApiAuditsService {
63
+ environments = inject(ENVIRONMENT_TOKEN);
64
+ http = inject(HttpClient);
65
+ /**
66
+ * Retrieves the URL for the audits API from the environment configurations.
67
+ * If the URL is not defined, an empty string is returned.
68
+ *
69
+ * @return {string} The API Audits URL or an empty string if not defined.
70
+ */
71
+ get url() {
72
+ return this.environments.apiAuditsUrl ?? '';
73
+ }
74
+ /**
75
+ * Retrieves a list of database connections based on query parameters.
76
+ *
77
+ * @param {QueryParams} params - Query parameters for filtering and pagination.
78
+ * @returns {Observable<ConnectionsOut>} The list of connections.
79
+ */
80
+ getConnections(params) {
81
+ return this.http.get(`${this.url}/connections`, { params })
82
+ .pipe(map(({ data }) => data));
83
+ }
84
+ /**
85
+ * Retrieves transaction logs based on the provided query parameters.
86
+ *
87
+ * @param {QueryParams} params - Query parameters for filtering, pagination, and order.
88
+ * @returns {Observable<TransactionLogsOut>} The list of transaction logs and total count.
89
+ */
90
+ getTransactionLogs(params) {
91
+ return this.http.get(`${this.url}/transaction-logs`, { params })
92
+ .pipe(map(({ data }) => data));
93
+ }
94
+ /**
95
+ * Starts an asynchronous Excel generation for all transaction logs matching the filters.
96
+ * Pass filters without page limit/offset. Response includes a transaction_id for progress tracking.
97
+ *
98
+ * @param {QueryParams} params - Filter query parameters (no pagination).
99
+ * @returns {Observable<TransactionLogsDownloadOut>} Observable with the export transaction id.
100
+ */
101
+ requestTransactionLogsExcel(params) {
102
+ return this.http.get(`${this.url}/transaction-logs`, {
103
+ params: {
104
+ ...params,
105
+ download: true
106
+ }
107
+ })
108
+ .pipe(map(({ data }) => data));
109
+ }
110
+ /**
111
+ * Downloads the generated Excel file for the given transaction id.
112
+ *
113
+ * @param {string} transactionId - Export transaction identifier.
114
+ * @returns {Observable<HttpResponse<ArrayBuffer>>} HTTP response with the Excel binary.
115
+ */
116
+ getDownload(transactionId) {
117
+ return this.http.get(`${this.url}/files/download/${transactionId}`, {
118
+ observe: 'response',
119
+ responseType: 'arraybuffer'
120
+ });
121
+ }
122
+ /**
123
+ * Cancels a pending Excel generation for the given transaction id.
124
+ *
125
+ * @param {string} transactionId - Export transaction identifier.
126
+ * @returns {Observable<{}>} Observable that completes when cancellation is processed.
127
+ */
128
+ deleteFileCheck(transactionId) {
129
+ return this.http.delete(`${this.url}/files/${transactionId}`)
130
+ .pipe(map(({ data }) => data));
131
+ }
132
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ApiAuditsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
133
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ApiAuditsService, providedIn: 'root' });
134
+ }
135
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ApiAuditsService, decorators: [{
136
+ type: Injectable,
137
+ args: [{
138
+ providedIn: 'root'
139
+ }]
140
+ }] });
141
+
62
142
  class ApiBillingCOService {
63
143
  environments = inject(ENVIRONMENT_TOKEN);
64
144
  http = inject(HttpClient);
@@ -5996,5 +6076,5 @@ const xmlHeaders = (format = 'object') => {
5996
6076
  * Generated bundle index. Do not edit.
5997
6077
  */
5998
6078
 
5999
- export { AccountTypeId, AccountTypeName, AlphaNumeric, ApiBillingCOService, ApiBillingDOService, ApiBillingGtService, ApiBillingMxService, ApiBillingPaService, ApiBillingSvService, ApiCashOperationsService, ApiCatalogsService, ApiCheckpointsService, ApiCompaniesService, ApiCompositionService, ApiCustomsService, ApiDiscountsService, ApiDropoffsService, ApiEToolsAutoBillingService, ApiEventsService, ApiExternalOperationsService, ApiInventoriesService, ApiInvoicesService, ApiNotificationsService, ApiOpenItemsService, ApiQuoteService, ApiReportsService, ApiSecurityService, ApiServicesService, ApiShipmentsService, ApiSuppliesService, ApiSurveysService, CryptoService, CustomerRoleType, DefaultValueType, DepositTypeCode, DocumentStatusCode, ENVIRONMENT_TOKEN, Event, Group, InventoryActions, InventoryErrorCodes, NgxServicesModule, OpeningStatusCode, OperationModuleStatus, PaymentTypeCode, PrintMode, PrintableFormat, PrintersService, PrintersType, RouteModelType, ShipmentIncomeTypeCode, TransferenceTypeCode, ViewSectionOption, WebSocketsService, apiHeadersInterceptor, apiTokenInterceptor, base64PdfToUrl, downloadBase64Pdf, httpCachingInterceptor, httpParams, pdfHeaders, provideNgxServices, queryString, xmlHeaders };
6079
+ export { AccountTypeId, AccountTypeName, AlphaNumeric, ApiAuditsService, ApiBillingCOService, ApiBillingDOService, ApiBillingGtService, ApiBillingMxService, ApiBillingPaService, ApiBillingSvService, ApiCashOperationsService, ApiCatalogsService, ApiCheckpointsService, ApiCompaniesService, ApiCompositionService, ApiCustomsService, ApiDiscountsService, ApiDropoffsService, ApiEToolsAutoBillingService, ApiEventsService, ApiExternalOperationsService, ApiInventoriesService, ApiInvoicesService, ApiNotificationsService, ApiOpenItemsService, ApiQuoteService, ApiReportsService, ApiSecurityService, ApiServicesService, ApiShipmentsService, ApiSuppliesService, ApiSurveysService, CryptoService, CustomerRoleType, DefaultValueType, DepositTypeCode, DocumentStatusCode, ENVIRONMENT_TOKEN, Event, Group, InventoryActions, InventoryErrorCodes, NgxServicesModule, OpeningStatusCode, OperationModuleStatus, PaymentTypeCode, PrintMode, PrintableFormat, PrintersService, PrintersType, RouteModelType, ShipmentIncomeTypeCode, TransferenceTypeCode, ViewSectionOption, WebSocketsService, apiHeadersInterceptor, apiTokenInterceptor, base64PdfToUrl, downloadBase64Pdf, httpCachingInterceptor, httpParams, pdfHeaders, provideNgxServices, queryString, xmlHeaders };
6000
6080
  //# sourceMappingURL=experteam-mx-ngx-services.mjs.map