@experteam-mx/ngx-services 20.0.29 → 20.1.0-environmentTest.0

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.
@@ -1,11 +1,9 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, NgModule, Inject, Injectable, inject } from '@angular/core';
3
- import * as i1 from '@angular/common/http';
4
- import { provideHttpClient, HttpHeaders, HttpResponse, HttpParams } from '@angular/common/http';
2
+ import { InjectionToken, makeEnvironmentProviders, NgModule, inject, Injectable } from '@angular/core';
3
+ import { provideHttpClient, HttpClient, HttpHeaders, HttpResponse, HttpParams } from '@angular/common/http';
5
4
  import { map, mergeMap, forkJoin, tap, Observable, of } from 'rxjs';
6
- import * as i1$1 from 'ngx-cookie-service';
7
- import { CookieService } from 'ngx-cookie-service';
8
5
  import { map as map$1, tap as tap$1 } from 'rxjs/operators';
6
+ import { CookieService } from 'ngx-cookie-service';
9
7
  import Pusher from 'pusher-js';
10
8
 
11
9
  /**
@@ -16,7 +14,22 @@ import Pusher from 'pusher-js';
16
14
  * within the application. This token is typically associated with an
17
15
  * `Environment` type that defines the structure of the configuration.
18
16
  */
19
- const ENVIRONMENT_TOKEN = new InjectionToken('Environments token');
17
+ const ENVIRONMENT_TOKEN = new InjectionToken('ENVIRONMENT_TOKEN');
18
+
19
+ /**
20
+ * Provides ngx-services dependencies for standalone Angular applications.
21
+ *
22
+ * Register this provider in `ApplicationConfig.providers` so all services in
23
+ * this library can resolve the environment-based configuration.
24
+ */
25
+ function provideNgxServices(environment) {
26
+ return makeEnvironmentProviders([
27
+ {
28
+ provide: ENVIRONMENT_TOKEN,
29
+ useValue: environment
30
+ }
31
+ ]);
32
+ }
20
33
 
21
34
  class NgxServicesModule {
22
35
  /**
@@ -25,23 +38,21 @@ class NgxServicesModule {
25
38
  * @param {Environment} environment - The environment configuration object.
26
39
  *
27
40
  * @return {ModuleWithProviders<NgxServicesModule>} The module with providers for the NgxServicesModule.
41
+ *
42
+ * @deprecated Use `provideNgxServices(environment)` in `ApplicationConfig.providers`
43
+ * for standalone applications. This API will be removed in `20.2.0`.
28
44
  */
29
45
  static forRoot(environment) {
30
46
  return {
31
47
  ngModule: NgxServicesModule,
32
- providers: [
33
- {
34
- provide: 'env',
35
- useValue: environment
36
- }
37
- ]
48
+ providers: [provideNgxServices(environment)]
38
49
  };
39
50
  }
40
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: NgxServicesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
41
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: NgxServicesModule });
42
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: NgxServicesModule, providers: [provideHttpClient()] });
51
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgxServicesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
52
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.18", ngImport: i0, type: NgxServicesModule });
53
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgxServicesModule, providers: [provideHttpClient()] });
43
54
  }
44
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: NgxServicesModule, decorators: [{
55
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: NgxServicesModule, decorators: [{
45
56
  type: NgModule,
46
57
  args: [{
47
58
  providers: [provideHttpClient()]
@@ -49,128 +60,110 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
49
60
  }] });
50
61
 
51
62
  class ApiBillingDOService {
52
- environments;
53
- http;
54
- constructor(environments, http) {
55
- this.environments = environments;
56
- this.http = http;
57
- }
63
+ environments = inject(ENVIRONMENT_TOKEN);
64
+ http = inject(HttpClient);
58
65
  /**
59
- * Retrieves the URL for the shipments API from the environment configurations.
66
+ * Gets the base URL for Billing DO API endpoints.
60
67
  *
61
- * @return {string} The URL of the shipments API.
68
+ * @returns {string} Billing DO API base URL, or an empty string when it is not configured.
62
69
  */
63
70
  get url() {
64
71
  return this.environments.apiBillingDO ?? '';
65
72
  }
66
73
  /**
67
- * Retrieves a list of income types
74
+ * Retrieves the list of income types from Billing DO.
68
75
  *
69
- * @return {Observable<ApiSuccess<IncomeTypesOut>>} An observable that emits the income types data.
76
+ * @returns {Observable<IncomeTypesOut>} Observable that emits the income types payload.
70
77
  */
71
78
  getIncomeTypes() {
72
79
  return this.http.get(`${this.url}/income-types`)
73
80
  .pipe(map(({ data }) => data));
74
81
  }
75
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiBillingDOService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
76
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiBillingDOService, providedIn: 'root' });
82
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiBillingDOService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
83
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiBillingDOService, providedIn: 'root' });
77
84
  }
78
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiBillingDOService, decorators: [{
85
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiBillingDOService, decorators: [{
79
86
  type: Injectable,
80
87
  args: [{
81
88
  providedIn: 'root'
82
89
  }]
83
- }], ctorParameters: () => [{ type: undefined, decorators: [{
84
- type: Inject,
85
- args: ['env']
86
- }] }, { type: i1.HttpClient }] });
90
+ }] });
87
91
 
88
92
  class ApiBillingGtService {
89
- environments;
90
- http;
91
- constructor(environments, http) {
92
- this.environments = environments;
93
- this.http = http;
94
- }
93
+ environments = inject(ENVIRONMENT_TOKEN);
94
+ http = inject(HttpClient);
95
95
  /**
96
- * Retrieves the URL for the billing GT API from the environment configurations.
96
+ * Gets the base URL for Billing GT API endpoints.
97
97
  *
98
- * @return {string} The URL of the shipments API.
98
+ * @returns {string} Billing GT API base URL, or an empty string when it is not configured.
99
99
  */
100
100
  get url() {
101
101
  return this.environments.apiBillingGT ?? '';
102
102
  }
103
103
  /**
104
- * RRetrieves the list of billing configurations to locations
104
+ * Retrieves the list of billing configurations by location.
105
105
  *
106
- * @return {Observable<BillingConfigsOut>} An observable that emits an array of billing configurations to locations
106
+ * @returns {Observable<BillingConfigsOut>} Observable that emits the billing configurations payload.
107
107
  */
108
108
  getConfigs() {
109
109
  return this.http.get(`${this.url}/location/configs`)
110
110
  .pipe(map(({ data }) => data));
111
111
  }
112
112
  /**
113
- * Retrieves the details of a location in billing configurations
113
+ * Retrieves billing configuration details for a location.
114
114
  *
115
- * @param {number} id - The id of the location to fetch.
116
- * @return {Observable<BillingConfigOut>} An observable that emits the location billing configuration data.
115
+ * @param {number} id - Location identifier to fetch.
116
+ * @returns {Observable<BillingConfigOut>} Observable that emits the location billing configuration payload.
117
117
  */
118
118
  getConfig(id) {
119
119
  return this.http.get(`${this.url}/locations/${id}`)
120
120
  .pipe(map(({ data }) => data));
121
121
  }
122
122
  /**
123
- * Sends a POST request to create a new billing configuration location.
123
+ * Creates a billing configuration for a location.
124
124
  *
125
- * @param {BillingConfigIn} body - The billing configuration to location data to be sent in the request body.
126
- * @return {Observable<BillingConfigOut>} An observable emitting the created billing configuration to location data.
125
+ * @param {BillingConfigIn} body - Billing configuration payload for the location.
126
+ * @returns {Observable<BillingConfigOut>} Observable that emits the created billing configuration payload.
127
127
  */
128
128
  postConfigs(body) {
129
129
  return this.http.post(`${this.url}/locations`, body)
130
130
  .pipe(map(({ data }) => data));
131
131
  }
132
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiBillingGtService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
133
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiBillingGtService, providedIn: 'root' });
132
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiBillingGtService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
133
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiBillingGtService, providedIn: 'root' });
134
134
  }
135
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiBillingGtService, decorators: [{
135
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiBillingGtService, decorators: [{
136
136
  type: Injectable,
137
137
  args: [{
138
138
  providedIn: 'root'
139
139
  }]
140
- }], ctorParameters: () => [{ type: undefined, decorators: [{
141
- type: Inject,
142
- args: ['env']
143
- }] }, { type: i1.HttpClient }] });
140
+ }] });
144
141
 
145
142
  class ApiBillingMxService {
146
- environments;
147
- http;
148
- constructor(environments, http) {
149
- this.environments = environments;
150
- this.http = http;
151
- }
143
+ environments = inject(ENVIRONMENT_TOKEN);
144
+ http = inject(HttpClient);
152
145
  /**
153
- * Retrieves the URL for the shipments API from the environment configurations.
146
+ * Gets the base URL for Billing MX API endpoints.
154
147
  *
155
- * @return {string} The URL of the shipments API.
148
+ * @returns {string} Billing MX API base URL, or an empty string when it is not configured.
156
149
  */
157
150
  get url() {
158
151
  return this.environments.apiBillingMX ?? '';
159
152
  }
160
153
  /**
161
- * Fetches the tax regimen data from the server.
154
+ * Retrieves the list of fiscal regimens from Billing MX.
162
155
  *
163
- * @return {Observable<FiscalRegimensOut>} An observable that emits the fiscal regimen data.
156
+ * @returns {Observable<FiscalRegimensOut>} Observable that emits the fiscal regimens payload.
164
157
  */
165
158
  getFiscalRegimens() {
166
159
  return this.http.get(`${this.url}/fiscal-regimens`)
167
160
  .pipe(map(({ data }) => data));
168
161
  }
169
162
  /**
170
- * Fetches a paginated list of CFDIs (Comprobante Fiscal Digital por Internet) based on the provided fiscal regimen.
163
+ * Retrieves the CFDI uses accepted for a fiscal regimen.
171
164
  *
172
- * @param {number} fiscalRegimen - The fiscal regimen identifier to filter the CFDIs.
173
- * @return {Observable<FiscalRegimensAcceptedOut>} An observable containing the paginated list of CFDIs.
165
+ * @param {number} fiscalRegimen Fiscal regimen identifier used to filter accepted CFDI uses.
166
+ * @returns {Observable<FiscalRegimensAcceptedOut>} Observable that emits the accepted CFDI uses payload.
174
167
  */
175
168
  getFiscalRegimensAccepted(fiscalRegimen) {
176
169
  const params = { 'fiscal-regimen': fiscalRegimen };
@@ -178,48 +171,41 @@ class ApiBillingMxService {
178
171
  .pipe(map(({ data }) => data));
179
172
  }
180
173
  /**
181
- * Fetches and validates postal code data from the server.
174
+ * Retrieves postal code information from Billing MX.
182
175
  *
183
- * @param {QueryParams} params - Query parameters used to filter the postal code data.
184
- * @return {Observable<PostalCodesOut>} - An observable emitting the validated postal code data.
176
+ * @param {QueryParams} params Query parameters used by the postal codes endpoint.
177
+ * @returns {Observable<PostalCodesOut>} Observable that emits the postal code data payload.
185
178
  */
186
179
  getPostalCodes(params) {
187
180
  return this.http.get(`${this.url}/postal-codes`, { params })
188
181
  .pipe(map(({ data }) => data));
189
182
  }
190
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiBillingMxService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
191
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiBillingMxService, providedIn: 'root' });
183
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiBillingMxService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
184
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiBillingMxService, providedIn: 'root' });
192
185
  }
193
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiBillingMxService, decorators: [{
186
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiBillingMxService, decorators: [{
194
187
  type: Injectable,
195
188
  args: [{
196
189
  providedIn: 'root'
197
190
  }]
198
- }], ctorParameters: () => [{ type: undefined, decorators: [{
199
- type: Inject,
200
- args: ['env']
201
- }] }, { type: i1.HttpClient }] });
191
+ }] });
202
192
 
203
193
  class ApiBillingPaService {
204
- environments;
205
- http;
206
- constructor(environments, http) {
207
- this.environments = environments;
208
- this.http = http;
209
- }
194
+ environments = inject(ENVIRONMENT_TOKEN);
195
+ http = inject(HttpClient);
210
196
  /**
211
- * Retrieves the URL for the Billing Pa API from the environment configurations.
197
+ * Gets the base URL for Billing PA API endpoints.
212
198
  *
213
- * @return {string} The URL of the Billing Pa API.
199
+ * @returns {string} Billing PA API base URL, or an empty string when it is not configured.
214
200
  */
215
201
  get url() {
216
202
  return this.environments.apiBillingPA ?? '';
217
203
  }
218
204
  /**
219
- * Retrieves a list of districts based on query parameters.
205
+ * Retrieves the list of districts.
220
206
  *
221
- * @param {QueryParams} params - Query parameters for filtering the districts.
222
- * @returns {Observable<DistrictsOut>} The list of districts.
207
+ * @param {QueryParams} params Query parameters used by the districts endpoint.
208
+ * @returns {Observable<DistrictsOut>} Observable that emits the districts payload.
223
209
  */
224
210
  getDistricts(params) {
225
211
  return this.http.get(`${this.url}/districts`, {
@@ -227,10 +213,10 @@ class ApiBillingPaService {
227
213
  }).pipe(map(({ data }) => data));
228
214
  }
229
215
  /**
230
- * Retrieves a list of parishes based on query parameters.
216
+ * Retrieves the list of parishes.
231
217
  *
232
- * @param {QueryParams} params - Query parameters for filtering the parishes.
233
- * @returns {Observable<ParishesOut>} The list of parishes.
218
+ * @param {QueryParams} params Query parameters used by the parishes endpoint.
219
+ * @returns {Observable<ParishesOut>} Observable that emits the parishes payload.
234
220
  */
235
221
  getParishes(params) {
236
222
  return this.http.get(`${this.url}/parishes`, {
@@ -238,10 +224,10 @@ class ApiBillingPaService {
238
224
  }).pipe(map(({ data }) => data));
239
225
  }
240
226
  /**
241
- * Retrieves a list of provinces based on query parameters.
227
+ * Retrieves the list of provinces.
242
228
  *
243
- * @param {QueryParams} params - Query parameters for filtering the provinces.
244
- * @returns {Observable<ProvincesOut>} The list of provinces.
229
+ * @param {QueryParams} params Query parameters used by the provinces endpoint.
230
+ * @returns {Observable<ProvincesOut>} Observable that emits the provinces payload.
245
231
  */
246
232
  getProvinces(params) {
247
233
  return this.http.get(`${this.url}/provinces`, {
@@ -249,10 +235,10 @@ class ApiBillingPaService {
249
235
  }).pipe(map(({ data }) => data));
250
236
  }
251
237
  /**
252
- * Retrieves the details of a customer based on query parameters.
238
+ * Validates a customer using Billing PA.
253
239
  *
254
- * @param {QueryParams} params - Query parameters for get customer.
255
- * @return {Observable<BillingPaCustomerOut>} An observable that emits customer data.
240
+ * @param {QueryParams} params Query parameters used by the customer validation endpoint.
241
+ * @returns {Observable<BillingPaCustomerOut>} Observable that emits customer validation data.
256
242
  */
257
243
  getValidateCustomer(params) {
258
244
  return this.http.get(`${this.url}/validate-customer`, {
@@ -260,59 +246,52 @@ class ApiBillingPaService {
260
246
  }).pipe(map(({ data }) => data));
261
247
  }
262
248
  /**
263
- * RRetrieves the list of billing configurations to locations
249
+ * Retrieves billing configurations by location.
264
250
  *
265
- * @return {Observable<BillingConfigsOut>} An observable that emits an array of billing configurations to locations
251
+ * @returns {Observable<BillingConfigsOut>} Observable that emits billing configuration items.
266
252
  */
267
253
  getConfigs() {
268
254
  return this.http.get(`${this.url}/location/configs`)
269
255
  .pipe(map(({ data }) => data));
270
256
  }
271
257
  /**
272
- * Retrieves the details of a location in billing configurations
258
+ * Retrieves the billing configuration for a location.
273
259
  *
274
- * @param {number} id - The id of the location to fetch.
275
- * @return {Observable<BillingConfigOut>} An observable that emits the location billing configuration data.
260
+ * @param {number} id Location identifier.
261
+ * @returns {Observable<BillingConfigOut>} Observable that emits the location billing configuration payload.
276
262
  */
277
263
  getConfig(id) {
278
264
  return this.http.get(`${this.url}/locations/${id}`)
279
265
  .pipe(map(({ data }) => data));
280
266
  }
281
267
  /**
282
- * Sends a POST request to create a new billing configuration location.
268
+ * Creates a billing configuration for a location.
283
269
  *
284
- * @param {BillingConfigIn} body - The billing configuration to location data to be sent in the request body.
285
- * @return {Observable<BillingConfigOut>} An observable emitting the created billing configuration to location data.
270
+ * @param {BillingConfigIn} body Billing configuration payload for the new location.
271
+ * @returns {Observable<BillingConfigOut>} Observable that emits the created billing configuration payload.
286
272
  */
287
273
  postConfigs(body) {
288
274
  return this.http.post(`${this.url}/locations`, body)
289
275
  .pipe(map(({ data }) => data));
290
276
  }
291
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiBillingPaService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
292
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiBillingPaService, providedIn: 'root' });
277
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiBillingPaService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
278
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiBillingPaService, providedIn: 'root' });
293
279
  }
294
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiBillingPaService, decorators: [{
280
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiBillingPaService, decorators: [{
295
281
  type: Injectable,
296
282
  args: [{
297
283
  providedIn: 'root'
298
284
  }]
299
- }], ctorParameters: () => [{ type: undefined, decorators: [{
300
- type: Inject,
301
- args: ['env']
302
- }] }, { type: i1.HttpClient }] });
285
+ }] });
303
286
 
304
287
  class ApiBillingSvService {
305
- environments;
306
- http;
307
- constructor(environments, http) {
308
- this.environments = environments;
309
- this.http = http;
310
- }
288
+ environments = inject(ENVIRONMENT_TOKEN);
289
+ http = inject(HttpClient);
311
290
  /**
312
291
  * Retrieves the URL for the billing API.
313
292
  * If the URL is not defined in the environments configuration, returns an empty string.
314
293
  *
315
- * @return {string} The billing API URL or an empty string if not set.
294
+ * @returns {string} The billing API URL or an empty string if not set.
316
295
  */
317
296
  get url() {
318
297
  return this.environments.apiBillingSV ?? '';
@@ -321,7 +300,7 @@ class ApiBillingSvService {
321
300
  * Fetches the list of economic activities based on the provided query parameters.
322
301
  *
323
302
  * @param {QueryParams} params - The query parameters used to filter the economic activities.
324
- * @return {Observable<EconomicActivitiesOut>} An observable that emits the list of economic activities.
303
+ * @returns {Observable<EconomicActivitiesOut>} An observable that emits the list of economic activities.
325
304
  */
326
305
  getEconomicActivities(params) {
327
306
  return this.http.get(`${this.url}/economic-activities`, { params })
@@ -331,7 +310,7 @@ class ApiBillingSvService {
331
310
  * Retrieves the list of person types based on given query parameters.
332
311
  *
333
312
  * @param {QueryParams} params - The query parameters used to filter the person types.
334
- * @return {Observable<PersonTypesOut>} An observable that emits a list of person types.
313
+ * @returns {Observable<PersonTypesOut>} An observable that emits a list of person types.
335
314
  */
336
315
  getPersonTypes(params) {
337
316
  return this.http.get(`${this.url}/person-types`, { params })
@@ -341,7 +320,7 @@ class ApiBillingSvService {
341
320
  * Fetches the list of establishment types.
342
321
  *
343
322
  * @param {QueryParams} params The query parameters to be sent with the HTTP request.
344
- * @return {Observable<EstablishmentTypesOut>} An observable that emits the establishment types data.
323
+ * @returns {Observable<EstablishmentTypesOut>} An observable that emits the establishment types data.
345
324
  */
346
325
  getEstablishmentTypes(params) {
347
326
  return this.http.get(`${this.url}/establishment-types`, { params })
@@ -351,7 +330,7 @@ class ApiBillingSvService {
351
330
  * Fetches the list of departments based on the provided query parameters.
352
331
  *
353
332
  * @param {QueryParams} params - The query parameters to filter or modify the departments fetch request.
354
- * @return {Observable<DepartmentsOut>} An observable emitting the list of departments.
333
+ * @returns {Observable<DepartmentsOut>} An observable emitting the list of departments.
355
334
  */
356
335
  getDepartments(params) {
357
336
  return this.http.get(`${this.url}/departments`, { params })
@@ -361,36 +340,29 @@ class ApiBillingSvService {
361
340
  * Retrieves a list of municipalities based on the provided query parameters.
362
341
  *
363
342
  * @param {QueryParams} params - The query parameters used to filter the municipalities.
364
- * @return {Observable<MunicipalitiesOut>} An observable that emits the retrieved municipalities data.
343
+ * @returns {Observable<MunicipalitiesOut>} An observable that emits the retrieved municipalities data.
365
344
  */
366
345
  getMunicipalities(params) {
367
346
  return this.http.get(`${this.url}/municipalities`, { params })
368
347
  .pipe(map(({ data }) => data));
369
348
  }
370
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiBillingSvService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
371
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiBillingSvService, providedIn: 'root' });
349
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiBillingSvService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
350
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiBillingSvService, providedIn: 'root' });
372
351
  }
373
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiBillingSvService, decorators: [{
352
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiBillingSvService, decorators: [{
374
353
  type: Injectable,
375
354
  args: [{
376
355
  providedIn: 'root'
377
356
  }]
378
- }], ctorParameters: () => [{ type: undefined, decorators: [{
379
- type: Inject,
380
- args: ['env']
381
- }] }, { type: i1.HttpClient }] });
357
+ }] });
382
358
 
383
359
  class ApiCashOperationsService {
384
- environments;
385
- http;
386
- constructor(environments, http) {
387
- this.environments = environments;
388
- this.http = http;
389
- }
360
+ environments = inject(ENVIRONMENT_TOKEN);
361
+ http = inject(HttpClient);
390
362
  /**
391
363
  * Retrieves the URL for the cash operations API from the environment configurations.
392
364
  *
393
- * @return {string} The URL of the cash operations API.
365
+ * @returns {string} The URL of the cash operations API.
394
366
  */
395
367
  get url() {
396
368
  return this.environments.apiCashOperationsUrl ?? '';
@@ -465,26 +437,19 @@ class ApiCashOperationsService {
465
437
  return this.http.get(`${this.url}/deposits/${id}/slip`)
466
438
  .pipe(map(({ data }) => data));
467
439
  }
468
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiCashOperationsService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
469
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiCashOperationsService, providedIn: 'root' });
440
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiCashOperationsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
441
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiCashOperationsService, providedIn: 'root' });
470
442
  }
471
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiCashOperationsService, decorators: [{
443
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiCashOperationsService, decorators: [{
472
444
  type: Injectable,
473
445
  args: [{
474
446
  providedIn: 'root'
475
447
  }]
476
- }], ctorParameters: () => [{ type: undefined, decorators: [{
477
- type: Inject,
478
- args: ['env']
479
- }] }, { type: i1.HttpClient }] });
448
+ }] });
480
449
 
481
450
  class ApiCatalogsService {
482
- environments;
483
- http;
484
- constructor(environments, http) {
485
- this.environments = environments;
486
- this.http = http;
487
- }
451
+ environments = inject(ENVIRONMENT_TOKEN);
452
+ http = inject(HttpClient);
488
453
  /**
489
454
  * Retrieves the URL for the reports API from the environment configurations.
490
455
  *
@@ -1095,26 +1060,19 @@ class ApiCatalogsService {
1095
1060
  return this.http.get(`${this.url}/package-locations`, { params })
1096
1061
  .pipe(map(({ data }) => data));
1097
1062
  }
1098
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiCatalogsService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
1099
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiCatalogsService, providedIn: 'root' });
1063
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiCatalogsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1064
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiCatalogsService, providedIn: 'root' });
1100
1065
  }
1101
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiCatalogsService, decorators: [{
1066
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiCatalogsService, decorators: [{
1102
1067
  type: Injectable,
1103
1068
  args: [{
1104
1069
  providedIn: 'root'
1105
1070
  }]
1106
- }], ctorParameters: () => [{ type: undefined, decorators: [{
1107
- type: Inject,
1108
- args: ['env']
1109
- }] }, { type: i1.HttpClient }] });
1071
+ }] });
1110
1072
 
1111
1073
  class ApiCompaniesService {
1112
- environments;
1113
- http;
1114
- constructor(environments, http) {
1115
- this.environments = environments;
1116
- this.http = http;
1117
- }
1074
+ environments = inject(ENVIRONMENT_TOKEN);
1075
+ http = inject(HttpClient);
1118
1076
  /**
1119
1077
  * Retrieves the URL for the companies API from the environment configurations.
1120
1078
  *
@@ -1941,6 +1899,24 @@ class ApiCompaniesService {
1941
1899
  return this.http.post(`${this.url}/workflow-configs/batch`, body)
1942
1900
  .pipe(map(({ data }) => data));
1943
1901
  }
1902
+ /**
1903
+ * Retrieves a list of companies based on the provided query parameters.
1904
+ * @param params - The query parameters to filter and paginate the companies list
1905
+ * @returns An Observable that emits the companies data
1906
+ */
1907
+ getCompanies(params) {
1908
+ return this.http.get(`${this.url}/companies`, { params })
1909
+ .pipe(map(({ data }) => data));
1910
+ }
1911
+ /**
1912
+ * Retrieves a company by its ID.
1913
+ * @param id - The unique identifier of the company to retrieve.
1914
+ * @returns An Observable that emits the company data.
1915
+ */
1916
+ getCompany(id) {
1917
+ return this.http.get(`${this.url}/companies/${id}`)
1918
+ .pipe(map(({ data }) => data));
1919
+ }
1944
1920
  /**
1945
1921
  * Sends a POST request to create a new company and returns the created company's details.
1946
1922
  *
@@ -2141,32 +2117,23 @@ class ApiCompaniesService {
2141
2117
  }
2142
2118
  }).pipe(map(({ data }) => data));
2143
2119
  }
2144
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiCompaniesService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
2145
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiCompaniesService, providedIn: 'root' });
2120
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiCompaniesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2121
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiCompaniesService, providedIn: 'root' });
2146
2122
  }
2147
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiCompaniesService, decorators: [{
2123
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiCompaniesService, decorators: [{
2148
2124
  type: Injectable,
2149
2125
  args: [{
2150
2126
  providedIn: 'root'
2151
2127
  }]
2152
- }], ctorParameters: () => [{ type: undefined, decorators: [{
2153
- type: Inject,
2154
- args: ['env']
2155
- }] }, { type: i1.HttpClient }] });
2128
+ }] });
2156
2129
 
2157
2130
  class ApiCompositionService {
2158
- environments;
2159
- cookie;
2160
- http;
2161
- constructor(environments, cookie, http) {
2162
- this.environments = environments;
2163
- this.cookie = cookie;
2164
- this.http = http;
2165
- }
2131
+ environments = inject(ENVIRONMENT_TOKEN);
2132
+ http = inject(HttpClient);
2166
2133
  /**
2167
2134
  * Retrieves the API security URL from the environment configuration.
2168
2135
  *
2169
- * @return {string} The API security URL.
2136
+ * @returns {string} The API security URL.
2170
2137
  */
2171
2138
  get url() {
2172
2139
  return this.environments.apiCompositionUrl ?? '';
@@ -2175,7 +2142,7 @@ class ApiCompositionService {
2175
2142
  * Retrieves shipment details based on the provided shipment ID.
2176
2143
  *
2177
2144
  * @param {number} id - The unique identifier of the shipment to retrieve.
2178
- * @return {Observable<ShipmentOut>} An observable that emits the details of the shipment.
2145
+ * @returns {Observable<ShipmentOut>} An observable that emits the details of the shipment.
2179
2146
  */
2180
2147
  getShipment(id) {
2181
2148
  return this.http.get(`${this.url}/shipments/${id}`)
@@ -2185,32 +2152,25 @@ class ApiCompositionService {
2185
2152
  * Fetches the country references data based on the provided query parameters.
2186
2153
  *
2187
2154
  * @param {QueryParams} params - The query parameters for the API request.
2188
- * @return {Observable<CompositionCountryReferencesOut>} - An observable emitting the country references.
2155
+ * @returns {Observable<CompositionCountryReferencesOut>} An observable emitting the country references.
2189
2156
  */
2190
2157
  getCountryReferences(params) {
2191
2158
  return this.http.get(`${this.url}/country-references`, { params })
2192
2159
  .pipe(map(({ data }) => data));
2193
2160
  }
2194
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiCompositionService, deps: [{ token: 'env' }, { token: i1$1.CookieService }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
2195
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiCompositionService, providedIn: 'root' });
2161
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiCompositionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2162
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiCompositionService, providedIn: 'root' });
2196
2163
  }
2197
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiCompositionService, decorators: [{
2164
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiCompositionService, decorators: [{
2198
2165
  type: Injectable,
2199
2166
  args: [{
2200
2167
  providedIn: 'root'
2201
2168
  }]
2202
- }], ctorParameters: () => [{ type: undefined, decorators: [{
2203
- type: Inject,
2204
- args: ['env']
2205
- }] }, { type: i1$1.CookieService }, { type: i1.HttpClient }] });
2169
+ }] });
2206
2170
 
2207
2171
  class ApiCustomsService {
2208
- environments;
2209
- http;
2210
- constructor(environments, http) {
2211
- this.environments = environments;
2212
- this.http = http;
2213
- }
2172
+ environments = inject(ENVIRONMENT_TOKEN);
2173
+ http = inject(HttpClient);
2214
2174
  /**
2215
2175
  * Retrieves the URL for the cash operations API from the environment configurations.
2216
2176
  *
@@ -2344,26 +2304,19 @@ class ApiCustomsService {
2344
2304
  params
2345
2305
  }).pipe(map(({ data }) => data));
2346
2306
  }
2347
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiCustomsService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
2348
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiCustomsService, providedIn: 'root' });
2307
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiCustomsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2308
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiCustomsService, providedIn: 'root' });
2349
2309
  }
2350
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiCustomsService, decorators: [{
2310
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiCustomsService, decorators: [{
2351
2311
  type: Injectable,
2352
2312
  args: [{
2353
2313
  providedIn: 'root'
2354
2314
  }]
2355
- }], ctorParameters: () => [{ type: undefined, decorators: [{
2356
- type: Inject,
2357
- args: ['env']
2358
- }] }, { type: i1.HttpClient }] });
2315
+ }] });
2359
2316
 
2360
2317
  class ApiDiscountsService {
2361
- environments;
2362
- http;
2363
- constructor(environments, http) {
2364
- this.environments = environments;
2365
- this.http = http;
2366
- }
2318
+ environments = inject(ENVIRONMENT_TOKEN);
2319
+ http = inject(HttpClient);
2367
2320
  /**
2368
2321
  * Gets the API endpoint URL for discounts from the environments configuration.
2369
2322
  *
@@ -2582,26 +2535,19 @@ class ApiDiscountsService {
2582
2535
  return this.http.put(`${this.url}/customer-restrictions/V2/${id}`, body)
2583
2536
  .pipe(map(({ data }) => data));
2584
2537
  }
2585
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiDiscountsService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
2586
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiDiscountsService, providedIn: 'root' });
2538
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiDiscountsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2539
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiDiscountsService, providedIn: 'root' });
2587
2540
  }
2588
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiDiscountsService, decorators: [{
2541
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiDiscountsService, decorators: [{
2589
2542
  type: Injectable,
2590
2543
  args: [{
2591
2544
  providedIn: 'root'
2592
2545
  }]
2593
- }], ctorParameters: () => [{ type: undefined, decorators: [{
2594
- type: Inject,
2595
- args: ['env']
2596
- }] }, { type: i1.HttpClient }] });
2546
+ }] });
2597
2547
 
2598
2548
  class ApiEToolsAutoBillingService {
2599
- environments;
2600
- http;
2601
- constructor(environments, http) {
2602
- this.environments = environments;
2603
- this.http = http;
2604
- }
2549
+ environments = inject(ENVIRONMENT_TOKEN);
2550
+ http = inject(HttpClient);
2605
2551
  /**
2606
2552
  * Retrieves the URL for the shipments API from the environment configurations.
2607
2553
  *
@@ -2684,30 +2630,23 @@ class ApiEToolsAutoBillingService {
2684
2630
  return this.http.post(`${this.url}/external-shipments/${id}/re-billing`, body)
2685
2631
  .pipe(map(({ data }) => data));
2686
2632
  }
2687
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiEToolsAutoBillingService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
2688
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiEToolsAutoBillingService, providedIn: 'root' });
2633
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiEToolsAutoBillingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2634
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiEToolsAutoBillingService, providedIn: 'root' });
2689
2635
  }
2690
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiEToolsAutoBillingService, decorators: [{
2636
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiEToolsAutoBillingService, decorators: [{
2691
2637
  type: Injectable,
2692
2638
  args: [{
2693
2639
  providedIn: 'root'
2694
2640
  }]
2695
- }], ctorParameters: () => [{ type: undefined, decorators: [{
2696
- type: Inject,
2697
- args: ['env']
2698
- }] }, { type: i1.HttpClient }] });
2641
+ }] });
2699
2642
 
2700
2643
  class ApiEventsService {
2701
- environments;
2702
- http;
2703
- constructor(environments, http) {
2704
- this.environments = environments;
2705
- this.http = http;
2706
- }
2644
+ environments = inject(ENVIRONMENT_TOKEN);
2645
+ http = inject(HttpClient);
2707
2646
  /**
2708
2647
  * Gets the API endpoint URL for Events from the environments configuration.
2709
2648
  *
2710
- * @return {string} The URL for the Events API. Returns an empty string if not defined.
2649
+ * @returns {string} The URL for the Events API. Returns an empty string if not defined.
2711
2650
  */
2712
2651
  get url() {
2713
2652
  return this.environments.apiEventsUrl ?? '';
@@ -2716,7 +2655,7 @@ class ApiEventsService {
2716
2655
  * Sends a request to start an event
2717
2656
  *
2718
2657
  * @param {OperationModuleStartIn} body - The event information to be submitted.
2719
- * @return {Observable<OperationModuleOut>} An Observable emitting the server's response containing the created event details.
2658
+ * @returns {Observable<OperationModuleOut>} An Observable emitting the server's response containing the created event details.
2720
2659
  */
2721
2660
  postOperationModulesStart(body) {
2722
2661
  return this.http.post(`${this.url}/operation-modules/start`, body)
@@ -2727,34 +2666,26 @@ class ApiEventsService {
2727
2666
  *
2728
2667
  * @param {number} id - The unique identifier of the item whose event is to be updated.
2729
2668
  * @param {OperationModuleEndIn} body - The payload containing the updated event details.
2730
- * @return {Observable<OperationModuleOut>} An observable emitting the updated event details.
2669
+ * @returns {Observable<OperationModuleOut>} An observable emitting the updated event details.
2731
2670
  */
2732
2671
  putOperationModulesEnd(id, body) {
2733
2672
  return this.http.put(`${this.url}/operation-modules/${id}/end`, body)
2734
2673
  .pipe(map(({ data }) => data));
2735
2674
  }
2736
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiEventsService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
2737
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiEventsService, providedIn: 'root' });
2675
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiEventsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2676
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiEventsService, providedIn: 'root' });
2738
2677
  }
2739
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiEventsService, decorators: [{
2678
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiEventsService, decorators: [{
2740
2679
  type: Injectable,
2741
2680
  args: [{
2742
2681
  providedIn: 'root'
2743
2682
  }]
2744
- }], ctorParameters: () => [{ type: undefined, decorators: [{
2745
- type: Inject,
2746
- args: ['env']
2747
- }] }, { type: i1.HttpClient }] });
2683
+ }] });
2748
2684
 
2749
2685
  class ApiExternalOperationsService {
2750
- http;
2751
- environment;
2752
- appKey;
2753
- constructor(http, environment) {
2754
- this.http = http;
2755
- this.environment = environment;
2756
- this.appKey = environment.apiExternalOperationsKey ?? '';
2757
- }
2686
+ http = inject(HttpClient);
2687
+ environment = inject(ENVIRONMENT_TOKEN);
2688
+ appKey = this.environment.apiExternalOperationsKey ?? '';
2758
2689
  /**
2759
2690
  * Getter method to retrieve the API's external operations URL.
2760
2691
  * Fetches the URL from the `apiExternalOperationsUrl` property of the environment object.
@@ -2816,26 +2747,19 @@ class ApiExternalOperationsService {
2816
2747
  getAppKeyHeader() {
2817
2748
  return { ...(this.appKey && { AppKey: this.appKey }) };
2818
2749
  }
2819
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiExternalOperationsService, deps: [{ token: i1.HttpClient }, { token: 'env' }], target: i0.ɵɵFactoryTarget.Injectable });
2820
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiExternalOperationsService, providedIn: 'root' });
2750
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiExternalOperationsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2751
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiExternalOperationsService, providedIn: 'root' });
2821
2752
  }
2822
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiExternalOperationsService, decorators: [{
2753
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiExternalOperationsService, decorators: [{
2823
2754
  type: Injectable,
2824
2755
  args: [{
2825
2756
  providedIn: 'root'
2826
2757
  }]
2827
- }], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
2828
- type: Inject,
2829
- args: ['env']
2830
- }] }] });
2758
+ }] });
2831
2759
 
2832
2760
  class ApiInventoriesService {
2833
- environments;
2834
- http;
2835
- constructor(environments, http) {
2836
- this.environments = environments;
2837
- this.http = http;
2838
- }
2761
+ environments = inject(ENVIRONMENT_TOKEN);
2762
+ http = inject(HttpClient);
2839
2763
  /**
2840
2764
  * Retrieves the URL for the Inventories API from the environment configurations.
2841
2765
  *
@@ -3024,42 +2948,35 @@ class ApiInventoriesService {
3024
2948
  * Fetches the missing package details based on query parameters.
3025
2949
  *
3026
2950
  * @param {QueryParams} params - The query parameters for filtering the missing package details.
3027
- * @return {Observable<PackageReEntryMissingOut>} An observable that emits the detail missing package data.
2951
+ * @return {Observable<ReEntryOfMissingPackageOut>} An observable that emits the detail missing package data.
3028
2952
  */
3029
- getPackageReEntryMissing(params) {
3030
- return this.http.get(`${this.url}/package-re-entry-missing`, {
2953
+ getReEntryOfMissingPackages(params) {
2954
+ return this.http.get(`${this.url}/re-entry-of-missing-packages`, {
3031
2955
  params
3032
2956
  }).pipe(map(({ data }) => data));
3033
2957
  }
3034
2958
  /**
3035
2959
  * Re-entry missing packages
3036
2960
  *
3037
- * @param {IncidentIn} body - The missing packages data to be re-entry.
3038
- * @returns {Observable<PackageReEntryMissingsOut>} An observable detail of the updated incident reason complement.
2961
+ * @param {ReEntryOfMissingPackagesIn} body - The missing packages data to be re-entry.
2962
+ * @returns {Observable<ReEntryOfMissingPackagesOut>} An observable detail of the updated incident reason complement.
3039
2963
  */
3040
- putPackageReEntryMissing(body) {
3041
- return this.http.put(`${this.url}/package-re-entry-missing`, body).pipe(map(({ data }) => data));
2964
+ putReEntryOfMissingPackages(body) {
2965
+ return this.http.put(`${this.url}/re-entry-of-missing-packages`, body).pipe(map(({ data }) => data));
3042
2966
  }
3043
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiInventoriesService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
3044
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiInventoriesService, providedIn: 'root' });
2967
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiInventoriesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2968
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiInventoriesService, providedIn: 'root' });
3045
2969
  }
3046
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiInventoriesService, decorators: [{
2970
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiInventoriesService, decorators: [{
3047
2971
  type: Injectable,
3048
2972
  args: [{
3049
2973
  providedIn: 'root'
3050
2974
  }]
3051
- }], ctorParameters: () => [{ type: undefined, decorators: [{
3052
- type: Inject,
3053
- args: ['env']
3054
- }] }, { type: i1.HttpClient }] });
2975
+ }] });
3055
2976
 
3056
2977
  class ApiInvoicesService {
3057
- environments;
3058
- http;
3059
- constructor(environments, http) {
3060
- this.environments = environments;
3061
- this.http = http;
3062
- }
2978
+ environments = inject(ENVIRONMENT_TOKEN);
2979
+ http = inject(HttpClient);
3063
2980
  /**
3064
2981
  * Retrieves the API URL for invoices from the environments configuration.
3065
2982
  *
@@ -3498,26 +3415,19 @@ class ApiInvoicesService {
3498
3415
  return this.http.get(`${this.url}/country-document-types`, { params })
3499
3416
  .pipe(map(({ data }) => data));
3500
3417
  }
3501
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiInvoicesService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
3502
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiInvoicesService, providedIn: 'root' });
3418
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiInvoicesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3419
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiInvoicesService, providedIn: 'root' });
3503
3420
  }
3504
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiInvoicesService, decorators: [{
3421
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiInvoicesService, decorators: [{
3505
3422
  type: Injectable,
3506
3423
  args: [{
3507
3424
  providedIn: 'root'
3508
3425
  }]
3509
- }], ctorParameters: () => [{ type: undefined, decorators: [{
3510
- type: Inject,
3511
- args: ['env']
3512
- }] }, { type: i1.HttpClient }] });
3426
+ }] });
3513
3427
 
3514
3428
  class ApiNotificationsService {
3515
- environments;
3516
- http;
3517
- constructor(environments, http) {
3518
- this.environments = environments;
3519
- this.http = http;
3520
- }
3429
+ environments = inject(ENVIRONMENT_TOKEN);
3430
+ http = inject(HttpClient);
3521
3431
  /**
3522
3432
  * Retrieves the URL for the notifications API from the environment settings.
3523
3433
  * If the URL is not defined, an empty string is returned.
@@ -3598,30 +3508,23 @@ class ApiNotificationsService {
3598
3508
  return this.http.get(`${this.url}/notification-types`, { params })
3599
3509
  .pipe(map(({ data }) => data));
3600
3510
  }
3601
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiNotificationsService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
3602
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiNotificationsService, providedIn: 'root' });
3511
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiNotificationsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3512
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiNotificationsService, providedIn: 'root' });
3603
3513
  }
3604
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiNotificationsService, decorators: [{
3514
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiNotificationsService, decorators: [{
3605
3515
  type: Injectable,
3606
3516
  args: [{
3607
3517
  providedIn: 'root'
3608
3518
  }]
3609
- }], ctorParameters: () => [{ type: undefined, decorators: [{
3610
- type: Inject,
3611
- args: ['env']
3612
- }] }, { type: i1.HttpClient }] });
3519
+ }] });
3613
3520
 
3614
3521
  class ApiOpenItemsService {
3615
- environments;
3616
- http;
3617
- constructor(environments, http) {
3618
- this.environments = environments;
3619
- this.http = http;
3620
- }
3522
+ environments = inject(ENVIRONMENT_TOKEN);
3523
+ http = inject(HttpClient);
3621
3524
  /**
3622
3525
  * Retrieves the API URL for open-items from the environments' configuration.
3623
3526
  *
3624
- * @return {string} The API URL for open-items.
3527
+ * @returns {string} The API URL for open-items.
3625
3528
  */
3626
3529
  get url() {
3627
3530
  return this.environments.apiOpenItemsUrl ?? '';
@@ -3630,7 +3533,7 @@ class ApiOpenItemsService {
3630
3533
  * Retrieves a list of open-items based on the provided query parameters.
3631
3534
  *
3632
3535
  * @param {QueryParams} params - The parameters to use for querying open-items.
3633
- * @return {Observable<OpenItemsOut>} An observable that emits the open-item's data.
3536
+ * @returns {Observable<OpenItemsOut>} An observable that emits the open-item data.
3634
3537
  */
3635
3538
  getOpenItems(params) {
3636
3539
  return this.http.get(`${this.url}/open-items`, { params })
@@ -3640,7 +3543,7 @@ class ApiOpenItemsService {
3640
3543
  * Processes a payment for an open item.
3641
3544
  *
3642
3545
  * @param {PaymentOpenItemIn} body - The payment details for the open item.
3643
- * @return {Observable<PaymentOut>} An observable that emits the result of the payment processing.
3546
+ * @returns {Observable<PaymentOut>} An observable that emits the result of the payment processing.
3644
3547
  */
3645
3548
  postPayment(body) {
3646
3549
  return this.http.post(`${this.url}/payment`, body)
@@ -3650,38 +3553,25 @@ class ApiOpenItemsService {
3650
3553
  * Processes a payment for other invoice.
3651
3554
  *
3652
3555
  * @param {OtherInvoiceIn} body - The payment details for the other invoice.
3653
- * @return {Observable<OtherInvoiceOut>} An observable that emits the result of the payment processing.
3556
+ * @returns {Observable<OtherInvoiceOut>} An observable that emits the result of the payment processing.
3654
3557
  */
3655
3558
  postOtherInvoice(body) {
3656
3559
  return this.http.post(`${this.url}/other-invoices`, body)
3657
3560
  .pipe(map(({ data }) => data));
3658
3561
  }
3659
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiOpenItemsService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
3660
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiOpenItemsService, providedIn: 'root' });
3562
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiOpenItemsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3563
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiOpenItemsService, providedIn: 'root' });
3661
3564
  }
3662
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiOpenItemsService, decorators: [{
3565
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiOpenItemsService, decorators: [{
3663
3566
  type: Injectable,
3664
3567
  args: [{
3665
3568
  providedIn: 'root'
3666
3569
  }]
3667
- }], ctorParameters: () => [{ type: undefined, decorators: [{
3668
- type: Inject,
3669
- args: ['env']
3670
- }] }, { type: i1.HttpClient }] });
3570
+ }] });
3671
3571
 
3672
- /**
3673
- * Service to manage quote-related events.
3674
- *
3675
- * This service provides methods to retrieve, create, and get event types
3676
- * related to quote processes.
3677
- */
3678
3572
  class ApiQuoteService {
3679
- environments;
3680
- http;
3681
- constructor(environments, http) {
3682
- this.environments = environments;
3683
- this.http = http;
3684
- }
3573
+ environments = inject(ENVIRONMENT_TOKEN);
3574
+ http = inject(HttpClient);
3685
3575
  /**
3686
3576
  * Base URL for the Quotes API.
3687
3577
  */
@@ -3739,26 +3629,19 @@ class ApiQuoteService {
3739
3629
  return this.http.get(`${this.url}/quote-event-types`, { params })
3740
3630
  .pipe(map(({ data }) => data));
3741
3631
  }
3742
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiQuoteService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
3743
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiQuoteService, providedIn: 'root' });
3632
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiQuoteService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3633
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiQuoteService, providedIn: 'root' });
3744
3634
  }
3745
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiQuoteService, decorators: [{
3635
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiQuoteService, decorators: [{
3746
3636
  type: Injectable,
3747
3637
  args: [{
3748
3638
  providedIn: 'root'
3749
3639
  }]
3750
- }], ctorParameters: () => [{ type: undefined, decorators: [{
3751
- type: Inject,
3752
- args: ['env']
3753
- }] }, { type: i1.HttpClient }] });
3640
+ }] });
3754
3641
 
3755
3642
  class ApiReportsService {
3756
- environments;
3757
- http;
3758
- constructor(environments, http) {
3759
- this.environments = environments;
3760
- this.http = http;
3761
- }
3643
+ environments = inject(ENVIRONMENT_TOKEN);
3644
+ http = inject(HttpClient);
3762
3645
  /**
3763
3646
  * Retrieves the URL for the reports API from the environment configurations.
3764
3647
  *
@@ -3907,28 +3790,20 @@ class ApiReportsService {
3907
3790
  return this.http.get(`${this.url}/sales-book-report`, { params })
3908
3791
  .pipe(map(({ data }) => data));
3909
3792
  }
3910
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiReportsService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
3911
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiReportsService, providedIn: 'root' });
3793
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiReportsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3794
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiReportsService, providedIn: 'root' });
3912
3795
  }
3913
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiReportsService, decorators: [{
3796
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiReportsService, decorators: [{
3914
3797
  type: Injectable,
3915
3798
  args: [{
3916
3799
  providedIn: 'root'
3917
3800
  }]
3918
- }], ctorParameters: () => [{ type: undefined, decorators: [{
3919
- type: Inject,
3920
- args: ['env']
3921
- }] }, { type: i1.HttpClient }] });
3801
+ }] });
3922
3802
 
3923
3803
  class ApiSecurityService {
3924
- environments;
3925
- cookie;
3926
- http;
3927
- constructor(environments, cookie, http) {
3928
- this.environments = environments;
3929
- this.cookie = cookie;
3930
- this.http = http;
3931
- }
3804
+ cookie = inject(CookieService);
3805
+ http = inject(HttpClient);
3806
+ environments = inject(ENVIRONMENT_TOKEN);
3932
3807
  /**
3933
3808
  * Retrieves the API security URL from the environments configuration.
3934
3809
  *
@@ -4154,26 +4029,19 @@ class ApiSecurityService {
4154
4029
  }
4155
4030
  }).pipe(map(({ data }) => data));
4156
4031
  }
4157
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiSecurityService, deps: [{ token: 'env' }, { token: i1$1.CookieService }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
4158
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiSecurityService, providedIn: 'root' });
4032
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiSecurityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4033
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiSecurityService, providedIn: 'root' });
4159
4034
  }
4160
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiSecurityService, decorators: [{
4035
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiSecurityService, decorators: [{
4161
4036
  type: Injectable,
4162
4037
  args: [{
4163
4038
  providedIn: 'root'
4164
4039
  }]
4165
- }], ctorParameters: () => [{ type: undefined, decorators: [{
4166
- type: Inject,
4167
- args: ['env']
4168
- }] }, { type: i1$1.CookieService }, { type: i1.HttpClient }] });
4040
+ }] });
4169
4041
 
4170
4042
  class ApiServicesService {
4171
- environments;
4172
- http;
4173
- constructor(environments, http) {
4174
- this.environments = environments;
4175
- this.http = http;
4176
- }
4043
+ environments = inject(ENVIRONMENT_TOKEN);
4044
+ http = inject(HttpClient);
4177
4045
  /**
4178
4046
  * Retrieves the URL for the services API from the environment settings.
4179
4047
  * If the URL is not defined, an empty string is returned.
@@ -4273,26 +4141,19 @@ class ApiServicesService {
4273
4141
  params: queryParams
4274
4142
  }).pipe(map(({ data }) => data));
4275
4143
  }
4276
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiServicesService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
4277
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiServicesService, providedIn: 'root' });
4144
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiServicesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4145
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiServicesService, providedIn: 'root' });
4278
4146
  }
4279
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiServicesService, decorators: [{
4147
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiServicesService, decorators: [{
4280
4148
  type: Injectable,
4281
4149
  args: [{
4282
4150
  providedIn: 'root'
4283
4151
  }]
4284
- }], ctorParameters: () => [{ type: undefined, decorators: [{
4285
- type: Inject,
4286
- args: ['env']
4287
- }] }, { type: i1.HttpClient }] });
4152
+ }] });
4288
4153
 
4289
4154
  class ApiShipmentsService {
4290
- environments;
4291
- http;
4292
- constructor(environments, http) {
4293
- this.environments = environments;
4294
- this.http = http;
4295
- }
4155
+ environments = inject(ENVIRONMENT_TOKEN);
4156
+ http = inject(HttpClient);
4296
4157
  /**
4297
4158
  * Retrieves the URL for the shipments API from the environment configurations.
4298
4159
  *
@@ -4432,26 +4293,19 @@ class ApiShipmentsService {
4432
4293
  return this.http.put(`${this.url}/signature-page-settings/${id}`, body)
4433
4294
  .pipe(map(({ data }) => data));
4434
4295
  }
4435
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiShipmentsService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
4436
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiShipmentsService, providedIn: 'root' });
4296
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiShipmentsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4297
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiShipmentsService, providedIn: 'root' });
4437
4298
  }
4438
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiShipmentsService, decorators: [{
4299
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiShipmentsService, decorators: [{
4439
4300
  type: Injectable,
4440
4301
  args: [{
4441
4302
  providedIn: 'root'
4442
4303
  }]
4443
- }], ctorParameters: () => [{ type: undefined, decorators: [{
4444
- type: Inject,
4445
- args: ['env']
4446
- }] }, { type: i1.HttpClient }] });
4304
+ }] });
4447
4305
 
4448
4306
  class ApiSuppliesService {
4449
- environments;
4450
- http;
4451
- constructor(environments, http) {
4452
- this.environments = environments;
4453
- this.http = http;
4454
- }
4307
+ environments = inject(ENVIRONMENT_TOKEN);
4308
+ http = inject(HttpClient);
4455
4309
  /**
4456
4310
  * Retrieves the URL for the API supplies endpoint.
4457
4311
  *
@@ -4561,18 +4415,122 @@ class ApiSuppliesService {
4561
4415
  return this.http.get(`${this.url}/supply-locations/export/excel`, { params })
4562
4416
  .pipe(map(({ data }) => data));
4563
4417
  }
4564
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiSuppliesService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
4565
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiSuppliesService, providedIn: 'root' });
4418
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiSuppliesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4419
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiSuppliesService, providedIn: 'root' });
4420
+ }
4421
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiSuppliesService, decorators: [{
4422
+ type: Injectable,
4423
+ args: [{
4424
+ providedIn: 'root'
4425
+ }]
4426
+ }] });
4427
+
4428
+ class ApiSurveysService {
4429
+ environments = inject(ENVIRONMENT_TOKEN);
4430
+ http = inject(HttpClient);
4431
+ /**
4432
+ * Base URL for surveys API endpoints.
4433
+ * @returns The configured surveys API URL or an empty string.
4434
+ */
4435
+ get url() {
4436
+ return this.environments.apiSurveysUrl ?? '';
4437
+ }
4438
+ /**
4439
+ * Retrieves surveys list based on query parameters.
4440
+ * @param params Query parameters used to filter, paginate, or sort surveys.
4441
+ * @returns Observable stream with surveys response data.
4442
+ */
4443
+ getSurveys(params) {
4444
+ return this.http.get(`${this.url}/surveys`, { params })
4445
+ .pipe(map(({ data }) => data));
4446
+ }
4447
+ /**
4448
+ * Creates a new survey.
4449
+ * @param body Survey payload to create.
4450
+ * @returns Observable stream with created survey data.
4451
+ */
4452
+ postSurvey(body) {
4453
+ return this.http.post(`${this.url}/surveys`, body)
4454
+ .pipe(map(({ data }) => data));
4455
+ }
4456
+ /**
4457
+ * Replaces an existing survey by id.
4458
+ * @param id Survey identifier.
4459
+ * @param body Survey payload used to replace the resource.
4460
+ * @returns Observable stream with updated survey data.
4461
+ */
4462
+ putSurvey(id, body) {
4463
+ return this.http.put(`${this.url}/surveys/${id}`, body)
4464
+ .pipe(map(({ data }) => data));
4465
+ }
4466
+ /**
4467
+ * Partially updates an existing survey by id.
4468
+ * @param id Survey identifier.
4469
+ * @param body Partial survey payload with fields to update.
4470
+ * @returns Observable stream with updated survey data.
4471
+ */
4472
+ patchSurvey(id, body) {
4473
+ return this.http.patch(`${this.url}/surveys/${id}`, body)
4474
+ .pipe(map(({ data }) => data));
4475
+ }
4476
+ /**
4477
+ * Retrieves the questions for a survey.
4478
+ * @param id Survey identifier.
4479
+ * @param params Query parameters used to filter, paginate, or sort questions.
4480
+ * @returns Observable stream with survey questions response data.
4481
+ */
4482
+ getSurveyQuestions(id, params) {
4483
+ return this.http.get(`${this.url}/surveys/${id}/questions`, { params })
4484
+ .pipe(map(({ data }) => data));
4485
+ }
4486
+ /**
4487
+ * Creates a new question for a survey.
4488
+ * @param surveyId Parent survey identifier.
4489
+ * @param body Survey question payload to create.
4490
+ * @returns Observable stream with created survey question data.
4491
+ */
4492
+ postSurveyQuestion(surveyId, body) {
4493
+ return this.http.post(`${this.url}/surveys/${surveyId}/questions`, body)
4494
+ .pipe(map(({ data }) => data));
4495
+ }
4496
+ /**
4497
+ * Replaces an existing survey question by id.
4498
+ * @param questionId Survey question identifier.
4499
+ * @param body Survey question payload used to replace the resource.
4500
+ * @returns Observable stream with updated survey question data.
4501
+ */
4502
+ putSurveyQuestion(questionId, body) {
4503
+ return this.http.put(`${this.url}/questions/${questionId}`, body)
4504
+ .pipe(map(({ data }) => data));
4505
+ }
4506
+ /**
4507
+ * Partially updates an existing survey question by id.
4508
+ * @param questionId Survey question identifier.
4509
+ * @param body Partial survey question payload with fields to update.
4510
+ * @returns Observable stream with updated survey question data.
4511
+ */
4512
+ patchSurveyQuestion(questionId, body) {
4513
+ return this.http.patch(`${this.url}/questions/${questionId}`, body)
4514
+ .pipe(map(({ data }) => data));
4515
+ }
4516
+ /**
4517
+ * Retrieves the available question types.
4518
+ * @param params Query parameters used to filter, paginate, or sort question types.
4519
+ * @returns Observable stream with question types response data.
4520
+ */
4521
+ getQuestionTypes(params) {
4522
+ return this.http.get(`${this.url}/question-types`, { params })
4523
+ .pipe(map(({ data }) => data));
4524
+ }
4525
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiSurveysService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4526
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiSurveysService, providedIn: 'root' });
4566
4527
  }
4567
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiSuppliesService, decorators: [{
4528
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ApiSurveysService, decorators: [{
4568
4529
  type: Injectable,
4569
4530
  args: [{
4570
4531
  providedIn: 'root'
4571
4532
  }]
4572
- }], ctorParameters: () => [{ type: undefined, decorators: [{
4573
- type: Inject,
4574
- args: ['env']
4575
- }] }, { type: i1.HttpClient }] });
4533
+ }] });
4576
4534
 
4577
4535
  var ViewSectionOption;
4578
4536
  (function (ViewSectionOption) {
@@ -4613,10 +4571,9 @@ var AlphaNumeric;
4613
4571
  })(AlphaNumeric || (AlphaNumeric = {}));
4614
4572
 
4615
4573
  class WebSocketsService {
4616
- environments;
4617
4574
  pusher;
4618
- constructor(environments) {
4619
- this.environments = environments;
4575
+ environments = inject(ENVIRONMENT_TOKEN);
4576
+ constructor() {
4620
4577
  this.pusher = null;
4621
4578
  this.connect()
4622
4579
  .then((pusher) => {
@@ -4710,24 +4667,19 @@ class WebSocketsService {
4710
4667
  const waitTime = 3 * 1000;
4711
4668
  return new Promise((resolve) => setTimeout(resolve, waitTime));
4712
4669
  }
4713
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: WebSocketsService, deps: [{ token: 'env' }], target: i0.ɵɵFactoryTarget.Injectable });
4714
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: WebSocketsService, providedIn: 'root' });
4670
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: WebSocketsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4671
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: WebSocketsService, providedIn: 'root' });
4715
4672
  }
4716
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: WebSocketsService, decorators: [{
4673
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: WebSocketsService, decorators: [{
4717
4674
  type: Injectable,
4718
4675
  args: [{
4719
4676
  providedIn: 'root',
4720
4677
  }]
4721
- }], ctorParameters: () => [{ type: undefined, decorators: [{
4722
- type: Inject,
4723
- args: ['env']
4724
- }] }] });
4678
+ }], ctorParameters: () => [] });
4725
4679
 
4680
+ const AES_KEY_USAGES = ['encrypt', 'decrypt'];
4726
4681
  class CryptoService {
4727
- environments;
4728
- constructor(environments) {
4729
- this.environments = environments;
4730
- }
4682
+ environments = inject(ENVIRONMENT_TOKEN);
4731
4683
  async encryptAES(plaintext) {
4732
4684
  const cryptoKey = await this.loadKey();
4733
4685
  // Convert the plaintext in Uint8Array
@@ -4767,7 +4719,7 @@ class CryptoService {
4767
4719
  // Decode the base64 key to Uint8Array
4768
4720
  const rawKey = this.base64ToUint8Array(this.environments.secretKey);
4769
4721
  // Import the key to API Crypto
4770
- return await crypto.subtle.importKey('raw', rawKey, { name: 'AES-GCM' }, true, ['encrypt', 'decrypt']);
4722
+ return await crypto.subtle.importKey('raw', rawKey, { name: 'AES-GCM' }, true, AES_KEY_USAGES);
4771
4723
  }
4772
4724
  uint8ArrayToBase64(data) {
4773
4725
  let binary = '';
@@ -4804,18 +4756,15 @@ class CryptoService {
4804
4756
  }
4805
4757
  return bytes.buffer;
4806
4758
  }
4807
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CryptoService, deps: [{ token: 'env' }], target: i0.ɵɵFactoryTarget.Injectable });
4808
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CryptoService, providedIn: 'root' });
4759
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: CryptoService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4760
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: CryptoService, providedIn: 'root' });
4809
4761
  }
4810
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CryptoService, decorators: [{
4762
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: CryptoService, decorators: [{
4811
4763
  type: Injectable,
4812
4764
  args: [{
4813
4765
  providedIn: 'root'
4814
4766
  }]
4815
- }], ctorParameters: () => [{ type: undefined, decorators: [{
4816
- type: Inject,
4817
- args: ['env']
4818
- }] }] });
4767
+ }] });
4819
4768
 
4820
4769
  function isStaticAsset$1(url) {
4821
4770
  return url.startsWith('assets/') || url.includes('/i18n/');
@@ -5036,5 +4985,5 @@ const xmlHeaders = (format = 'object') => {
5036
4985
  * Generated bundle index. Do not edit.
5037
4986
  */
5038
4987
 
5039
- export { AlphaNumeric, ApiBillingDOService, ApiBillingGtService, ApiBillingMxService, ApiBillingPaService, ApiBillingSvService, ApiCashOperationsService, ApiCatalogsService, ApiCompaniesService, ApiCompositionService, ApiCustomsService, ApiDiscountsService, ApiEToolsAutoBillingService, ApiEventsService, ApiExternalOperationsService, ApiInventoriesService, ApiInvoicesService, ApiNotificationsService, ApiOpenItemsService, ApiQuoteService, ApiReportsService, ApiSecurityService, ApiServicesService, ApiShipmentsService, ApiSuppliesService, CryptoService, DefaultValueType, ENVIRONMENT_TOKEN, Event, NgxServicesModule, OperationModuleStatus, ViewSectionOption, WebSocketsService, apiHeadersInterceptor, apiKeyInterceptor, apiTokenInterceptor, base64PdfToUrl, downloadBase64Pdf, httpCachingInterceptor, httpParams, pdfHeaders, queryString, xmlHeaders };
4988
+ export { AlphaNumeric, ApiBillingDOService, ApiBillingGtService, ApiBillingMxService, ApiBillingPaService, ApiBillingSvService, ApiCashOperationsService, ApiCatalogsService, ApiCompaniesService, ApiCompositionService, ApiCustomsService, ApiDiscountsService, ApiEToolsAutoBillingService, ApiEventsService, ApiExternalOperationsService, ApiInventoriesService, ApiInvoicesService, ApiNotificationsService, ApiOpenItemsService, ApiQuoteService, ApiReportsService, ApiSecurityService, ApiServicesService, ApiShipmentsService, ApiSuppliesService, ApiSurveysService, CryptoService, DefaultValueType, ENVIRONMENT_TOKEN, Event, NgxServicesModule, OperationModuleStatus, ViewSectionOption, WebSocketsService, apiHeadersInterceptor, apiKeyInterceptor, apiTokenInterceptor, base64PdfToUrl, downloadBase64Pdf, httpCachingInterceptor, httpParams, pdfHeaders, provideNgxServices, queryString, xmlHeaders };
5040
4989
  //# sourceMappingURL=experteam-mx-ngx-services.mjs.map