@experteam-mx/ngx-services 18.5.3 → 18.5.5

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.
@@ -143,6 +143,65 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
143
143
  args: ['env']
144
144
  }] }, { type: i1.HttpClient }] });
145
145
 
146
+ class ApiCashOperationsService {
147
+ environments;
148
+ http;
149
+ constructor(environments, http) {
150
+ this.environments = environments;
151
+ this.http = http;
152
+ }
153
+ /**
154
+ * Retrieves the URL for the cash operations API from the environment configurations.
155
+ *
156
+ * @return {string} The URL of the cash operations API.
157
+ */
158
+ get url() {
159
+ return this.environments.apiCashOperationsUrl ?? '';
160
+ }
161
+ /**
162
+ * Creates a new installation country reference currency.
163
+ *
164
+ * @param {InstallationCountryReferenceCurrencyIn} body - The data for the new reference currency.
165
+ * @returns {Observable<InstallationCountryReferenceCurrencyOut>} The created reference currency.
166
+ */
167
+ postInstallationCountryReferenceCurrency(body) {
168
+ return this.http.post(`${this.url}/installation-country-reference-currencies`, body).pipe(map(({ data }) => data));
169
+ }
170
+ /**
171
+ * Updates an existing installation country reference currency.
172
+ *
173
+ * @param {number} id - The ID of the reference currency to update.
174
+ * @param {InstallationCountryReferenceCurrencyIn} body - The updated data for the reference currency.
175
+ * @returns {Observable<InstallationCountryReferenceCurrencyOut>} The updated reference currency.
176
+ */
177
+ putInstallationCountryReferenceCurrency(id, body) {
178
+ return this.http.put(`${this.url}/installation-country-reference-currencies/${id}`, body)
179
+ .pipe(map(({ data }) => data));
180
+ }
181
+ /**
182
+ * Retrieves a list of installation country reference currencies based on query parameters.
183
+ *
184
+ * @param {QueryParams} params - Query parameters for filtering the currencies.
185
+ * @returns {Observable<InstallationCountryReferenceCurrenciesOut>} The list of reference currencies.
186
+ */
187
+ getInstallationCompanyCountryCurrencies(params) {
188
+ return this.http.get(`${this.url}/installation-country-reference-currencies`, {
189
+ params
190
+ }).pipe(map(({ data }) => data));
191
+ }
192
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiCashOperationsService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
193
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiCashOperationsService, providedIn: 'root' });
194
+ }
195
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiCashOperationsService, decorators: [{
196
+ type: Injectable,
197
+ args: [{
198
+ providedIn: 'root'
199
+ }]
200
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
201
+ type: Inject,
202
+ args: ['env']
203
+ }] }, { type: i1.HttpClient }] });
204
+
146
205
  class ApiCatalogsService {
147
206
  environments;
148
207
  http;
@@ -191,6 +250,315 @@ class ApiCatalogsService {
191
250
  params
192
251
  }).pipe(map(({ data }) => data));
193
252
  }
253
+ /**
254
+ * Submits an extra charge request to the server and returns the created extra charge details.
255
+ *
256
+ * @param {ExtraChargeIn} body - The data for the extra charge to be created.
257
+ * @return {Observable<ExtraChargeOut>} An observable that emits the details of the created extra charge.
258
+ */
259
+ postExtraCharge(body) {
260
+ return this.http.post(`${this.url}/extracharges`, body)
261
+ .pipe(map(({ data }) => data));
262
+ }
263
+ /**
264
+ * Updates an extra charge entity with new data and returns the updated entity.
265
+ *
266
+ * @param {number} id - The unique identifier of the extra charge to update.
267
+ * @param {ExtraChargeIn} body - The new data for the extra charge.
268
+ * @return {Observable<ExtraChargeOut>} An observable emitting the updated extra charge entity.
269
+ */
270
+ putExtraCharge(id, body) {
271
+ return this.http.put(`${this.url}/extracharges/${id}`, body)
272
+ .pipe(map(({ data }) => data));
273
+ }
274
+ /**
275
+ * Fetches a list of countries from the API.
276
+ *
277
+ * @param {QueryParams} params - The query parameters to be passed to the API request.
278
+ * @return {Observable<CountriesOut>} An observable containing the list of countries.
279
+ */
280
+ getCountries(params) {
281
+ return this.http.get(`${this.url}/countries`, { params })
282
+ .pipe(map(({ data }) => data));
283
+ }
284
+ /**
285
+ * Retrieves the details of a country based on its ID.
286
+ *
287
+ * @param {number} id - The identifier of the country to fetch.
288
+ * @return {Observable<CountryOut>} An observable that emits the country data.
289
+ */
290
+ getCountry(id) {
291
+ return this.http.get(`${this.url}/countries/${id}`)
292
+ .pipe(map(({ data }) => data));
293
+ }
294
+ /**
295
+ * Updates the details of a specific country by its ID.
296
+ *
297
+ * @param {number} id - The unique identifier of the country to be updated.
298
+ * @param {CountryIn} body - The data to update the country with.
299
+ * @return {Observable<CountryOut>} An observable that emits the updated country data.
300
+ */
301
+ putCountry(id, body) {
302
+ return this.http.put(`${this.url}/countries/${id}`, body)
303
+ .pipe(map(({ data }) => data));
304
+ }
305
+ /**
306
+ * Fetches postal location details based on the provided query parameters.
307
+ *
308
+ * @param {QueryParams} params - The query parameters to filter and fetch postal location data.
309
+ * @return {Observable<PostalLocationsOut>} An observable that emits the postal location details.
310
+ */
311
+ getPostalLocations(params) {
312
+ return this.http.get(`${this.url}/postal-locations`, { params })
313
+ .pipe(map(({ data }) => data));
314
+ }
315
+ /**
316
+ * Fetches a list of regions based on the provided query parameters.
317
+ *
318
+ * @param {QueryParams} params - The query parameters used to filter the regions.
319
+ * @return {Observable<RegionsOut>} An observable that emits the list of regions.
320
+ */
321
+ getRegions(params) {
322
+ return this.http.get(`${this.url}/regions`, { params })
323
+ .pipe(map(({ data }) => data));
324
+ }
325
+ /**
326
+ * Fetches the zones data based on the provided query parameters.
327
+ *
328
+ * @param {QueryParams} params - The query parameters used to filter the zones data.
329
+ * @return {Observable<ZonesOut>} An observable that emits the fetched zones data.
330
+ */
331
+ getZones(params) {
332
+ return this.http.get(`${this.url}/zones`, { params })
333
+ .pipe(map(({ data }) => data));
334
+ }
335
+ /**
336
+ * Fetches the management areas based on the provided query parameters.
337
+ *
338
+ * @param {QueryParams} params - The query parameters to filter the management areas.
339
+ * @return {Observable<ManagementAreasOut>} An observable that emits the management areas data.
340
+ */
341
+ getManagementAreas(params) {
342
+ return this.http.get(`${this.url}/management-areas`, { params })
343
+ .pipe(map(({ data }) => data));
344
+ }
345
+ /**
346
+ * Retrieves cancellation reasons from the server based on the provided query parameters.
347
+ *
348
+ * @param {QueryParams} params - The query parameters to filter the cancellation reasons.
349
+ * @return {Observable<CancellationReasonsOut>} An observable containing the retrieved cancellation reasons.
350
+ */
351
+ getCancellationReasons(params) {
352
+ return this.http.get(`${this.url}/cancellation-reasons`, { params })
353
+ .pipe(map(({ data }) => data));
354
+ }
355
+ /**
356
+ * Sends a cancellation reason to the server.
357
+ *
358
+ * @param {CancellationReasonIn} body - The cancellation reason object to be sent.
359
+ * @return {Observable<CancellationReasonOut>} An observable containing the server's response with the processed cancellation reason.
360
+ */
361
+ postCancellationReason(body) {
362
+ return this.http.post(`${this.url}/cancellation-reasons`, body)
363
+ .pipe(map(({ data }) => data));
364
+ }
365
+ /**
366
+ * Updates the cancellation reason for the specified ID with the provided data.
367
+ *
368
+ * @param {number} id - The unique identifier of the cancellation reason to update.
369
+ * @param {CancellationReasonIn} body - The details of the cancellation reason to be updated.
370
+ * @return {Observable<CancellationReasonOut>} An observable containing the updated cancellation reason.
371
+ */
372
+ putCancellationReason(id, body) {
373
+ return this.http.put(`${this.url}/cancellation-reasons/${id}`, body)
374
+ .pipe(map(({ data }) => data));
375
+ }
376
+ /**
377
+ * Retrieves a list of currencies based on the provided query parameters.
378
+ *
379
+ * @param {QueryParams} params - The query parameters to customize the currency retrieval request.
380
+ * @return {Observable<CurrenciesOut>} An observable that emits the retrieved currencies data.
381
+ */
382
+ getCurrencies(params) {
383
+ return this.http.get(`${this.url}/currencies`, { params })
384
+ .pipe(map(({ data }) => data));
385
+ }
386
+ /**
387
+ * Fetches the list of available languages based on the provided query parameters.
388
+ *
389
+ * @param {QueryParams} params - The query parameters to pass with the HTTP request.
390
+ * @return {Observable<LanguagesOut>} An observable that emits the available languages.
391
+ */
392
+ getLanguages(params) {
393
+ return this.http.get(`${this.url}/languages`, { params })
394
+ .pipe(map(({ data }) => data));
395
+ }
396
+ /**
397
+ * Fetches the available units from the API based on the provided query parameters.
398
+ *
399
+ * @param {QueryParams} params - The query parameters to filter the units being fetched.
400
+ * @return {Observable<UnitsOut>} An observable that emits the retrieved units data.
401
+ */
402
+ getUnits(params) {
403
+ return this.http.get(`${this.url}/units`, { params })
404
+ .pipe(map(({ data }) => data));
405
+ }
406
+ /**
407
+ * Retrieves the shipment scopes based on the provided query parameters.
408
+ *
409
+ * @param {QueryParams} params The query parameters to filter or modify the request for shipment scopes.
410
+ * @return {Observable<ShipmentScopesOut>} An observable that emits the shipment scopes data.
411
+ */
412
+ getShipmentScopes(params) {
413
+ return this.http.get(`${this.url}/shipment-scopes`, { params })
414
+ .pipe(map(({ data }) => data));
415
+ }
416
+ /**
417
+ * Fetches the available shipment content types based on the provided query parameters.
418
+ *
419
+ * @param {QueryParams} params - The query parameters to filter the shipment content types.
420
+ * @return {Observable<ShipmentContentTypesOut>} An observable that emits the shipment content types data.
421
+ */
422
+ getShipmentContentTypes(params) {
423
+ return this.http.get(`${this.url}/shipment-content-types`, { params })
424
+ .pipe(map(({ data }) => data));
425
+ }
426
+ /**
427
+ * Fetches a list of generic folios based on the given query parameters.
428
+ *
429
+ * @param {QueryParams} params - The query parameters used to filter the generic folios.
430
+ * @return {Observable<GenericFoliosOut>} An observable containing the fetched generic folios.
431
+ */
432
+ getGenericFolios(params) {
433
+ return this.http.get(`${this.url}/generic-folios`, { params })
434
+ .pipe(map(({ data }) => data));
435
+ }
436
+ /**
437
+ * Sends a POST request to create or update a generic folio.
438
+ *
439
+ * @param {GenericFolioIn} body - The payload containing the details of the generic folio to be created or updated.
440
+ * @return {Observable<GenericFolioOut>} An observable containing the response data of the created or updated generic folio.
441
+ */
442
+ postGenericFolio(body) {
443
+ return this.http.post(`${this.url}/generic-folios`, body)
444
+ .pipe(map(({ data }) => data));
445
+ }
446
+ /**
447
+ * Updates a generic folio with the specified ID using the provided data.
448
+ *
449
+ * @param {number} id - The unique identifier of the generic folio to update.
450
+ * @param {GenericFolioIn} body - The data to update the generic folio with.
451
+ * @return {Observable<GenericFolioOut>} An observable containing the updated generic folio.
452
+ */
453
+ putGenericFolio(id, body) {
454
+ return this.http.put(`${this.url}/generic-folios/${id}`, body)
455
+ .pipe(map(({ data }) => data));
456
+ }
457
+ /**
458
+ * Sends a PUT request to update a Generic Folio resource with the specified ID and body data, and returns the updated resource.
459
+ *
460
+ * @param {number} id - The unique identifier of the Generic Folio to be updated.
461
+ * @param {Partial<GenericFolioIn>} body - The partial data representing the changes to be applied to the Generic Folio.
462
+ * @return {Observable<GenericFolioOut>} An observable containing the updated Generic Folio resource.
463
+ */
464
+ pathGenericFolio(id, body) {
465
+ return this.http.put(`${this.url}/generic-folios/${id}`, body)
466
+ .pipe(map(({ data }) => data));
467
+ }
468
+ /**
469
+ * Sends a POST request to create a new product.
470
+ *
471
+ * @param {ProductIn} body - The product data to be sent in the request body.
472
+ * @return {Observable<ProductOut>} An observable emitting the created product data.
473
+ */
474
+ postProduct(body) {
475
+ return this.http.post(`${this.url}/products`, body)
476
+ .pipe(map(({ data }) => data));
477
+ }
478
+ /**
479
+ * Updates an existing product with the given ID using the provided data.
480
+ *
481
+ * @param {number} id - The unique identifier of the product to update.
482
+ * @param {ProductIn} body - The product data to update.
483
+ * @return {Observable<ProductOut>} An observable containing the updated product data.
484
+ */
485
+ putProduct(id, body) {
486
+ return this.http.put(`${this.url}/products/${id}`, body)
487
+ .pipe(map(({ data }) => data));
488
+ }
489
+ /**
490
+ * Retrieves a list of shipment income types based on the provided query parameters.
491
+ *
492
+ * @param {QueryParams} params - The query parameters to filter the shipment income types.
493
+ * @return {Observable<ShipmentIncomeTypesOut>} An observable containing the shipment income types data.
494
+ */
495
+ getShipmentIncomeTypes(params) {
496
+ return this.http.get(`${this.url}/shipment-income-types`, { params })
497
+ .pipe(map(({ data }) => data));
498
+ }
499
+ /**
500
+ * Sends a POST request to create a new shipment income type.
501
+ *
502
+ * @param {ShipmentIncomeTypeIn} body The payload containing the details of the shipment income type to be created.
503
+ * @return {Observable<ShipmentIncomeTypeOut>} An observable that emits the created shipment income type data.
504
+ */
505
+ postShipmentIncomeType(body) {
506
+ return this.http.post(`${this.url}/shipment-income-types`, body)
507
+ .pipe(map(({ data }) => data));
508
+ }
509
+ /**
510
+ * Updates the shipment income type with the specified ID.
511
+ *
512
+ * @param {number} id - The identifier of the shipment income type to update.
513
+ * @param {ShipmentIncomeTypeIn} body - The data to update the shipment income type with.
514
+ * @return {Observable<ShipmentIncomeTypeOut>} An observable emitting the updated shipment income type.
515
+ */
516
+ putShipmentIncomeType(id, body) {
517
+ return this.http.put(`${this.url}/shipment-income-types/${id}`, body)
518
+ .pipe(map(({ data }) => data));
519
+ }
520
+ /**
521
+ * Retrieves a list of unique folios based on the provided query parameters.
522
+ *
523
+ * @param {QueryParams} params - The query parameters used to filter and fetch unique folios.
524
+ * @return {Observable<UniqueFoliosOut>} An observable that emits the unique folios data.
525
+ */
526
+ getUniqueFolios(params) {
527
+ return this.http.get(`${this.url}/unique-folios`, { params })
528
+ .pipe(map(({ data }) => data));
529
+ }
530
+ /**
531
+ * Sends a POST request to create a unique folio.
532
+ *
533
+ * @param {UniqueFolioIn} body - The data object containing details for the unique folio to be created.
534
+ * @return {Observable<UniqueFolioOut>} An observable that emits the created unique folio details.
535
+ */
536
+ postUniqueFolio(body) {
537
+ return this.http.post(`${this.url}/unique-folios`, body)
538
+ .pipe(map(({ data }) => data));
539
+ }
540
+ /**
541
+ * Updates a unique folio with the given data using the provided ID.
542
+ *
543
+ * @param {number} id - The ID of the unique folio to be updated.
544
+ * @param {UniqueFolioIn} body - The payload containing the details of the unique folio to update.
545
+ * @return {Observable<UniqueFolioOut>} An observable that emits the updated unique folio.
546
+ */
547
+ putUniqueFolio(id, body) {
548
+ return this.http.put(`${this.url}/unique-folios/${id}`, body)
549
+ .pipe(map(({ data }) => data));
550
+ }
551
+ /**
552
+ * Updates a unique folio by its identifier with the provided data.
553
+ *
554
+ * @param {number} id - The identifier of the unique folio to update.
555
+ * @param {Partial<UniqueFolioIn>} body - The partial data of the unique folio to update.
556
+ * @return {Observable<UniqueFolioOut>} An observable emitting the updated unique folio data.
557
+ */
558
+ pathUniqueFolio(id, body) {
559
+ return this.http.put(`${this.url}/unique-folios/${id}`, body)
560
+ .pipe(map(({ data }) => data));
561
+ }
194
562
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiCatalogsService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
195
563
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiCatalogsService, providedIn: 'root' });
196
564
  }
@@ -1654,5 +2022,5 @@ const xmlHeaders = (format = 'object') => {
1654
2022
  * Generated bundle index. Do not edit.
1655
2023
  */
1656
2024
 
1657
- export { ApiBillingDOService, ApiBillingMxService, ApiCatalogsService, ApiCompaniesService, ApiEToolsAutoBillingService, ApiExternalPickupsService, ApiInvoicesService, ApiOpenItemsService, ApiReportsService, ApiSecurityService, ApiShipmentsService, CryptoService, ENVIRONMENT_TOKEN, NgxServicesModule, WebSocketsService, apiHeadersInterceptor, apiTokenInterceptor, httpCachingInterceptor, httpParams, pdfHeaders, queryString, xmlHeaders };
2025
+ export { ApiBillingDOService, ApiBillingMxService, ApiCashOperationsService, ApiCatalogsService, ApiCompaniesService, ApiEToolsAutoBillingService, ApiExternalPickupsService, ApiInvoicesService, ApiOpenItemsService, ApiReportsService, ApiSecurityService, ApiShipmentsService, CryptoService, ENVIRONMENT_TOKEN, NgxServicesModule, WebSocketsService, apiHeadersInterceptor, apiTokenInterceptor, httpCachingInterceptor, httpParams, pdfHeaders, queryString, xmlHeaders };
1658
2026
  //# sourceMappingURL=experteam-mx-ngx-services.mjs.map