@experteam-mx/ngx-services 18.5.4 → 18.5.6
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.
- package/esm2022/lib/apis/api-catalogs.service.mjs +310 -1
- package/esm2022/lib/apis/api-reports.service.mjs +12 -1
- package/esm2022/lib/apis/models/api-catalog.interfaces.mjs +1 -1
- package/esm2022/lib/apis/models/api-catalog.types.mjs +1 -1
- package/esm2022/lib/apis/models/api-reports.interfaces.mjs +1 -1
- package/esm2022/lib/apis/models/api-reports.types.mjs +1 -1
- package/fesm2022/experteam-mx-ngx-services.mjs +320 -0
- package/fesm2022/experteam-mx-ngx-services.mjs.map +1 -1
- package/lib/apis/api-catalogs.service.d.ts +220 -1
- package/lib/apis/api-reports.service.d.ts +8 -1
- package/lib/apis/models/api-catalog.interfaces.d.ts +93 -0
- package/lib/apis/models/api-catalog.types.d.ts +145 -1
- package/lib/apis/models/api-reports.interfaces.d.ts +25 -0
- package/lib/apis/models/api-reports.types.d.ts +7 -1
- package/package.json +1 -1
|
@@ -250,6 +250,315 @@ class ApiCatalogsService {
|
|
|
250
250
|
params
|
|
251
251
|
}).pipe(map(({ data }) => data));
|
|
252
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
|
+
}
|
|
253
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 });
|
|
254
563
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiCatalogsService, providedIn: 'root' });
|
|
255
564
|
}
|
|
@@ -1033,6 +1342,17 @@ class ApiReportsService {
|
|
|
1033
1342
|
return this.http.get(`${this.url}/external-shipments-report`, { params })
|
|
1034
1343
|
.pipe(map(({ data }) => data));
|
|
1035
1344
|
}
|
|
1345
|
+
/**
|
|
1346
|
+
* Retrieves a report of promotion code discounts based on the provided query parameters.
|
|
1347
|
+
*
|
|
1348
|
+
* @param {QueryParams} params - An object representing the query parameters for filtering the promotion code discounts report.
|
|
1349
|
+
* @return {Observable<PromotionCodeDiscountsOut>} An observable that emits the promotion code discounts report data.
|
|
1350
|
+
*/
|
|
1351
|
+
getPromotionCodeDiscounts(params) {
|
|
1352
|
+
return this.http.get(`${this.url}/promotion-code-discounts`, {
|
|
1353
|
+
params
|
|
1354
|
+
}).pipe(map(({ data }) => data));
|
|
1355
|
+
}
|
|
1036
1356
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiReportsService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1037
1357
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiReportsService, providedIn: 'root' });
|
|
1038
1358
|
}
|